Skip to content

[BUG] Sidebar agent status dot stale — idle sessions stay 'Working' indefinitely (3-day-stale observed) #251

Description

@domijin

Build

  • OpenCove.app CFBundleVersion = 0.2.0-nightly.20260509.1
  • macOS (Apple Silicon)

Color semantics (confirmed from src/app/renderer/styles/workspace-agent-item.css)

  • workspace-agent-item__status--working → green dot rgba(61, 255, 164, 0.85)
  • workspace-agent-item__status--standby → orange dot rgba(255, 190, 114, 0.9)

Symptom

Sidebar agent dots show the wrong color relative to the actual runtime state. Originally observed as an inversion across two adjacent items:

Sidebar item Actual state Dot color Dot should be
<session-A> not running (idle) green orange (standby)
<session-B> actively running orange green (working)

Decisive diagnostic — bug is in status detection, not CSS mapping

Hovered the dot on <agent-name>, which has actually been idle for 3 days. The hover tooltip text was:

Claude Code · <agent-name> · Working · 3 days ago

The dot was green. So:

  • Tooltip text matches the dot color (both say "Working") → CSS-class-to-color mapping is correct.
  • Both the dot and the tooltip disagree with reality → the bug is upstream, in status detection. The renderer believes this 3-day-idle session is still "Working".

Candidate root cause

From src/contexts/agent/domain/agentRuntimeStatus.ts and src/app/renderer/shell/utils/sidebarAgents.ts:

  • resolveInitialAgentRuntimeStatus(prompt) returns 'running' if the agent was created with a non-empty prompt.
  • resolveSidebarAgentStatus(runtimeStatus) returns 'working' for 'running' | 'restoring' | null.

So the failure mode that fits the 3-day-stale-Working observation is: the initial 'running' state is set when the agent is created with a prompt, but no later code path resets it to 'standby' after the PTY/stream goes quiet. Idle sessions stay green forever from the renderer's point of view.

(The originally-reported inverse case — an actively running session showing orange — is consistent with the same class of bug: the runtime status the renderer holds is whatever was last set, and it isn't being kept in sync with the live PTY heartbeat.)

Repro for the maintainer

  1. Open a workspace with at least one agent.
  2. Send a prompt; the agent runs and produces a response, then goes idle.
  3. Leave the agent idle for several minutes (or, for the 3-days-stale case, just look at any old idle agent in an existing workspace).
  4. Look at the sidebar dot for that agent: still green.
  5. Hover: tooltip says "Working", contradicting reality.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions