[BUG] Agent view: dispatched task intermittently never starts — spare worker not promoted to fleet (job state "working" but daemon roster still "spare")
Preflight Checklist
- [x] Searched existing issues — not reported
- [x] Single bug report
- [x] Latest version
What's Wrong?
In the interactive agent view, typing a prompt into the bottom input and pressing Enter once intermittently creates a task that never starts. The row shows the staged prompt but no model turn ever runs. Manually opening the task and re-submitting starts it every time.
I captured the daemon state during a live stall. Root cause is a warm-spare handoff race:
- The background daemon pre-spawns idle
spareworkers. On dispatch, a spare should be promotedspare→fleet, seeded with the prompt, and triggered to take its first turn. - For the stalled task, the job state flipped to
workingwith the prompt recorded (firstTerminalAt: null)… - …but the daemon roster for that same worker still shows
source: "spare",seed.intent: ""— never promoted, never seeded. daemon.logshowsbg spawned <id> (spare)with no subsequent(fleet)line (workers that actually run are re-logged asfleet).- No session transcript file is created; the worker process stays alive but idle (low CPU).
So the job/UI side and the daemon roster disagree about the same worker — UI thinks it is "working" with my prompt, daemon thinks it is an idle spare with no intent. Re-sending the prompt manually pushes it down the pty and wakes the idle spare. Because it depends on the timing of spare-consumption vs. promotion, it is intermittent — not correlated with prompt length.
Evidence (redacted — auth tokens / pipe nonces removed):
daemon.log:
[09:17:09] [bg] bg spawned 90605c6f (spare) <- pre-warmed spare
[09:17:48] [bg] bg spawned 5d12001b (spare) <- replacement spare (not the stall)
(no "(fleet)" line ever appears for 90605c6f -> never promoted)
jobs/90605c6f/state.json: { "state": "working", "intent": "<my prompt>", "firstTerminalAt": null }
daemon/roster.json[90605c6f]: { "source": "spare", "seed": { "intent": "" } } <- mismatch
session transcript for 90605c6f: does not exist
<img width="3006" height="179" alt="Image" src="https://github.com/user-attachments/assets/7263b5a7-9322-4cb8-a066-d1b641837391" />
<br/>
<img width="3054" height="634" alt="Image" src="https://github.com/user-attachments/assets/1bd2bf84-80c0-4650-9053-0640b0a3e7b7" />
What Should Happen?
Per the docs, one Enter starts the session immediately. The bound spare should be promoted to fleet, seeded with the prompt, and started — and the daemon roster should agree with the job state.
Steps to Reproduce
- Run
claudewith agent view (background daemon with a warm-spare pool active). - Type a prompt in the bottom input, press Enter once.
- Intermittently: the task row appears with the staged prompt but never runs. Job state =
workingwhile the daemon roster keeps the worker as an idlespare; no(fleet)promotion is logged and no transcript is written. Manually re-submitting starts it.
Error Messages/Logs
None surfaced to the user — the failure is silent (no (fleet) promotion, no transcript, no error).
Claude Model
Any (default Opus 4.8)
Is this a regression?
Yes — last working version unknown.
Last Working Version
No response
Claude Code Version
2.1.179 (Claude Code)
Platform
Claude subscription
Operating System
Windows 11
Terminal/Shell
Windows Terminal (Command Prompt / cmd.exe)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗