-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Description
After Claude emits <chief-done/> and Chief logs ✓ Story done, the process hangs with no further output. The watchdog then kills it after 5 minutes of silence, and the retry logic kicks in — even though the story completed successfully.
Full log
🔨 Bash php artisan test --compact --filter=CalendarTab 2>&1 | ta...
↳ Command running in background with ID: bosjvijy6. Output is being written to: /tmp/claude-1000/-home-plo...
🔨 Bash cat /tmp/claude-1000/-home-ploi-chief/937c5a25-1a62-4302-...
↳ (Bash completed with no output)
🔨 Bash php artisan test --compact --filter=CalendarTab 2>&1
↳ ......................................................
Tests: 54 passed (338 assertions)
Durat...
───────────────────────────────────────────────────────────
✓ Story done
───────────────────────────────────────────────────────────
⏱ No output for 5m0s, killing hung process
🔄 Claude crashed, retrying (1/3)...
Note: Claude first ran the test as a background task (run_in_background), then read the output file (empty — test still running), then re-ran the test in the foreground. The tests pass, story is marked done, but then Claude goes silent and the watchdog kills the process.
Expected behavior
After ✓ Story done, Chief should immediately end the iteration and proceed to onComplete (push/createPR) or the next story — not wait for further stdout that will never come.
Environment
- Chief: latest via Homebrew
- Agent: Claude (provider: claude)
- Config:
onComplete: { push: true, createPR: true }
Analysis
Looking at the source, processOutput() sets l.sawStoryDone = true when it sees EventStoryDone. However, it seems like the loop continues waiting for the Claude process to exit on its own rather than terminating it once sawStoryDone is set. Since Claude doesn't always exit cleanly after the final message, this leads to a 5-minute hang until the watchdog fires.
A possible fix would be to signal the iteration to stop (or gracefully terminate the Claude process) as soon as sawStoryDone is detected.