Skip to content

Claude pane reads working while only its background subagents run (title spinner after end_turn) #2069

Closed

Description

@Noobear

What happens

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)

  1. 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.
  2. 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

  1. added 3 commits that reference this issue on Oct 28, 2026
    79a7392
    f8f4a22
    2b70e44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions