Stop hook signals task-complete while background subagents are still running
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Shell
- Stelle
- 232
- Fork
- 56
- Merge medio
- 4g 15h
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di warpdotdev/claude-code-warp
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
warpdotdev/claude-code-warp#63 · 2 commenti ·
Tutte le issue di warpdotdev/claude-code-warp
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
docs: tutorial 7 still references removed A2AStarletteApplicationForse già presa @FOWEPJF255 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
a2aproject/A2A#2321 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
OpenSlides/OpenSlides#7180 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
magicmonty/bash-git-prompt#581 ·