You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claude pane reads working while only its background subagents run (title spinner after end_turn) #2069
A Claude Code pane whose turn has ended reads working in Ovis while a background subagent it started is still working. The chat shows "Working…" under the finished answer and the composer shows Stop, while the terminal sits at an empty ❯ prompt with only the subagent row running (○ general-purpose … 13m 59s · ↓ 442.4k tokens). It lasts as long as the subagent works, which can be many minutes. The sidebar, the alerts and the pending-message queue go by the same status.
Ovis already has the right state for this: server/background-wait.ts holds a pane at rest whose turn's work still runs as BG. Its comment assumes herdr reads such a pane as at rest — that no longer holds.
Why
Claude Code keeps its busy title spinner (◐/◑) up while a background subagent streams, even after the main turn ended. herdr's claude manifest rule osc_title_working (priority 1100, the highest) reads that title as working. Upstream herdr treats background work as working on purpose (herdrdev/herdr#5004), so the fix belongs here.
Reproduction (macOS, herdr 0.9.5, Claude Code 2.1.311)
In a herdr pane run claude, then: Launch one general-purpose agent with run_in_background true; its job is to write five 600-word essays into part1.md … part5.md, one Write call each. Right after launching, end your turn with OK.
Sample herdr pane get <pane> every 3 s.
Main transcript: the turn ends with OK (stop_reason: end_turn) at 16:28:13; the next main entry is the subagent's <task-notification> at 16:29:08.
16:28:08 done | ✳ Background agent sleep test
16:28:11 working | ◐ Background agent sleep test
16:28:14 working | ◑ … <- main turn already ended
… working | ◐/◑ … (every sample)
16:29:12 working | ◑ …
16:29:15 done | ✳ … <- the notification turn ends
A subagent that only waits on sleep 240 does not spin the title: herdr reads done and Ovis shows BG as intended. Only a streaming subagent triggers it.
Proposed fix
For a Claude pane, when herdr says working but the session's own transcript says the main turn ended (its last main-chain entry is an assistant end_turn) and the turn's subagents/commands still run (turnRunning > 0 in server/claude-subagents.ts), take the pane as at rest so BackgroundWait holds it as BG. When the transcript shows the main chain moving again (a prompt or a notification turn), herdr's working stands again. A PR for this follows.
Activity
fix(status): a Claude turn at rest under a streaming background subag…
fix(claude): reconcile background commands after cold history reads (#…
fix(claude): read old command history without blocking on slow storage (