claude-code - 💡(How to fix) Fix [BUG] Bottom toolbar conflates agents from multiple Claude Code sessions on the same machine [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56330Fetched 2026-05-06 06:31:00
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×7

Error Message

Error Messages/Logs

Root Cause

REPRO

  1. Open Claude Code session A. Spawn N agents via the Agent tool / TeamCreate.
  2. Open Claude Code session B (separate terminal, same machine). Spawn agents in B too via its own Agent tool / TeamCreate.
  3. In either session, observe the toolbar — it shows the union of agents from both sessions, with no visual indication of which agents belong to which.
  4. In session A, fully tear down its agents (TeamDelete + per-agent shutdown_request → confirmed shutdown_approved → teammate_terminated for every agent).
  5. Session A's toolbar STILL shows session B's agents (which are correctly running there) — and the user reads this as "my teardown didn't work," because the toolbar gives no signal that those remaining entries belong to another session entirely.

Fix Action

Fix / Workaround

WHY THIS MATTERS

  • Misleading after teardown — successful teardowns appear to have failed.
  • Misleading during dispatch — a user in session A trying to count their own spawned agents sees noise from sessions B/C/D.
  • Multi-session usage is common: one session per worktree, one per repo, one per parallel feature task. Not an edge case.
  • Especially impactful for plugins that orchestrate many concurrent agents (15+ per session is realistic), where cross-session noise dominates the toolbar and obscures the actual session state.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

TITLE Bottom toolbar conflates agents from multiple Claude Code sessions on the same machine

BEHAVIOR When multiple Claude Code sessions run on the same machine (un-sandboxed shared filesystem), the bottom toolbar in any session shows ALL agent processes across ALL sessions on the machine — not just the agents owned by the current session.

EVIDENCE FROM A REAL OCCURRENCE THAT TRIGGERED THIS REPORT

  • Session A torn down its full team (TeamDelete returned success; all 6 agents individually confirmed shutdown_approved + teammate_terminated).
  • Toolbar still showed ~21 active agents.
  • ps -ef | grep team-name confirmed those 21 agents belonged to two OTHER Claude Code sessions running on the same machine (different parent PIDs, different team names, different working directories).
  • Session A's own agent count via process inspection: 0 (correctly torn down).
  • The user's mental model — "the toolbar reflects my session" — was violated.

What Should Happen?

EXPECTED BEHAVIOR

  • Default: toolbar shows only agents whose --parent-session-id matches the current session's UUID.
  • Add an opt-in toggle (e.g., a setting or status-line indicator) for users who want machine-wide visibility across all their concurrent sessions.

WHY THIS MATTERS

  • Misleading after teardown — successful teardowns appear to have failed.
  • Misleading during dispatch — a user in session A trying to count their own spawned agents sees noise from sessions B/C/D.
  • Multi-session usage is common: one session per worktree, one per repo, one per parallel feature task. Not an edge case.
  • Especially impactful for plugins that orchestrate many concurrent agents (15+ per session is realistic), where cross-session noise dominates the toolbar and obscures the actual session state.

FIXABILITY The data needed to filter is already present in the agent process arguments — each agent process is launched with --parent-session-id <UUID> (visible via ps). The toolbar renderer just needs to filter the agent list by current session's UUID before display. No new state to capture.

ENVIRONMENT

  • Claude Code version: 2.1.121
  • OS: Darwin 25.4.0
  • Shell: zsh
  • Backend: Vertex AI (also reproducible on Anthropic API per user reports)
  • Trigger context: heavy multi-agent plugin (15+ concurrent agents per session); the bug applies to ANY multi-session use of the Agent tool, the plugin just makes it more visible by virtue of agent count.

Error Messages/Logs

Steps to Reproduce

REPRO

  1. Open Claude Code session A. Spawn N agents via the Agent tool / TeamCreate.
  2. Open Claude Code session B (separate terminal, same machine). Spawn agents in B too via its own Agent tool / TeamCreate.
  3. In either session, observe the toolbar — it shows the union of agents from both sessions, with no visual indication of which agents belong to which.
  4. In session A, fully tear down its agents (TeamDelete + per-agent shutdown_request → confirmed shutdown_approved → teammate_terminated for every agent).
  5. Session A's toolbar STILL shows session B's agents (which are correctly running there) — and the user reads this as "my teardown didn't work," because the toolbar gives no signal that those remaining entries belong to another session entirely.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

❯ claude --version 2.1.128 (Claude Code)

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

extent analysis

TL;DR

Filter the agent list in the toolbar by the current session's UUID to only show agents belonging to that session.

Guidance

  • The issue is likely caused by the toolbar not filtering agents by session ID, resulting in agents from multiple sessions being displayed together.
  • To verify, check the --parent-session-id argument passed to each agent process and ensure it matches the current session's UUID.
  • To mitigate, consider adding a temporary filter or indicator to distinguish between agents from different sessions in the toolbar.
  • The fix should involve modifying the toolbar renderer to filter the agent list based on the current session's UUID before display.

Example

No code snippet is provided as the issue does not include specific code details, but the solution would involve modifying the toolbar rendering logic to filter agents based on their --parent-session-id argument.

Notes

The issue is reported to be a regression, indicating that the functionality worked in a previous version, but the last working version is not specified.

Recommendation

Apply a workaround by filtering the agent list in the toolbar by the current session's UUID, as this directly addresses the reported issue and provides a clear path to resolving the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Bottom toolbar conflates agents from multiple Claude Code sessions on the same machine [1 participants]