Skip to content

Bug: Tab agent badge shows 'Done' when a subagent finishes, while the main agent is still running #12861

Description

@kikerojasx

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs a readiness label before a PR can be opened

Bug Description

When a CLI agent (e.g., OpenCode) spawns subagents, Warp's tab badge changes to Done as soon as any subagent finishes, even if the main agent conversation is still active or other subagents are still running. This makes it hard to know when the user actually needs to review the final response.

Steps to Reproduce

  1. Open a Warp tab running OpenCode.
  2. Ask OpenCode a question that causes it to spawn one or more subagents (e.g., a complex refactor or multi-file task).
  3. Observe the tab badge while subagents are running.
  4. When one subagent finishes, but the main agent or other subagents are still running, the badge switches to Done.

Expected Behavior

The tab badge should remain In progress until the main agent conversation has fully completed and no subagents are still active. Only then should it show Done.

Actual Behavior

The badge switches to Done as soon as the first subagent finishes, creating a false "ready for review" signal.

Operating System

macOS

Agent / Client

OpenCode

Shell

zsh

Additional Context

I have inspected the open-source codebase and believe the root cause is in CLIAgentSessionsModel, which currently stores one session per pane and transitions to Success on any Stop event from a subagent. There is no tracking of parent/child subagent relationships when computing the badge status.

I would love to contribute a fix. A proper solution would add subagent tracking to CLIAgentSessionsModel so that the pane-level session status considers the whole agent tree (main + subagents) before reporting Success.

Files likely involved:

  • app/src/terminal/cli_agent_sessions/mod.rs
  • app/src/workspace/view/vertical_tabs.rs
  • app/src/ai/agent/conversation.rs

Metadata

Metadata

Assignees

Labels

area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:window-tabs-panesWindow, tab, pane, and workspace layout management.bugSomething isn't working.os:macmacOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.warp:auto-triage-review

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions