Stop hook signals task-complete while background subagents are still running
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start with on-stop.sh and the transcript_path hook input described in the issue. Trace spawn markers in tool_results and completion records in queue-operation entries, then reproduce the background-subagent scenario. Done means the stop payload is suppressed while any spawned ID lacks completion, while transcript parse errors fail open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
on-stop.sh sends the task-complete payload on every Claude Code Stop event. But Stop fires whenever the main agent's turn ends — including turns that launched background subagents (Agent tool) or background Bash tasks that are still running. Warp flips the session to "Complete" and fires the done notification while work continues, then bounces back to "working" when the harness re-invokes the main agent on task completion.
Repro: in Warp, run claude, prompt "launch a research subagent in the background and end your turn." The turn ends → Warp shows Complete; the subagent is still running.
Suggested fix: Claude Code doesn't expose pending-task state to Stop hooks, but the transcript (transcript_path in hook input) carries a reliable ledger: spawn markers in tool_results (Async agent launched successfully … agentId: X / Command running in background with ID: X) and completion records (queue-operation entries containing <task-notification><task-id>X). If any spawned id lacks a completion record, suppress the stop payload — a later Stop fires naturally when the harness re-invokes the main agent after the last task completes. Fail open on parse errors. I have a working wrapper implementation locally and am happy to share it. (Longer term, an official pending-background-tasks field in Stop hook input from Anthropic would make this robust.)
Environment: plugin v2.2.0, Claude Code 2.1.233, macOS.
- Lenguaje dominante
- Shell
- Estrellas
- 232
- Forks
- 56
- Merge medio
- 4 d 15 h
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de warpdotdev/claude-code-warp
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
warpdotdev/claude-code-warp#63 · 2 comentarios ·
Todos los issues de warpdotdev/claude-code-warp
Issues similares
-
electron tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
alunduil/alunduil-chezmoi#870 ·
Los mantenedores suelen responder en 1 día
-
package-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
oSoWoSo/vOid_Community_repOsitory#268 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
feature good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dsx-ai-factory/infra-controller#7298 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Los mantenedores suelen responder en 1 día