Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Stop hook signals task-complete while background subagents are still running

Aperta
#82 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@neeilya ci sta già lavorando.

Dal 6/9/2026.

  • #85 di @neeilya — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
shell
Ambito
devtools

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di warpdotdev/claude-code-warp

Tutte le issue di warpdotdev/claude-code-warp

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.