Skip to content

[Bug]: Lead blocked on AskUserQuestion never reaches "Needs You" while an Agent Teams teammate is running tools #30833

Closed

Description

@doug-w

Operating system

Linux

Orca version

v1.4.225 (Claude Code 2.1.301)

Details

Short summary

When a Claude Code lead agent is blocked on AskUserQuestion while an Agent Teams teammate is actively running tools, the lead's pane does not show in the Agent Dashboard "Needs You" column. It stays in (or flips back to) Working, so the operator is never told the lead is waiting on them.

What happened?

In real team sessions the lead's card appears in Needs You briefly and then moves back to Working while the question is still open. In a controlled repro (below) it never showed in Needs You at all.

Controlled comparison, same pane, same Orca/Claude Code versions, lead calls AskUserQuestion and the operator watches the dashboard for 30s+ before answering:

Scenario Dashboard while question is open
Solo lead, nothing else running Stays in Needs You ✅
Lead + background subagent (Agent tool) running 30 sequential sleep 5 Bash calls Stays in Needs You ✅
Lead + Agent Teams teammate (teammateMode: tmux) running 24 sequential sleep 5 Bash calls Never shows in Needs You ❌

The teammate was also told to SendMessage the lead at ~30s and ~90s. Those mailbox messages were not delivered to the lead until after the question was answered, so teammate→lead message delivery is not what clears the waiting state. The teammate's own tool/lifecycle hook activity appears to be enough.

How can we reproduce it?

  1. Enable Agent Teams: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, "teammateMode": "tmux" in ~/.claude/settings.json, Orca hooks installed.
  2. In an Orca Claude pane, have the lead spawn a named teammate that loops on Bash tool calls (e.g. 24 × sleep 5 && date).
  3. While the teammate is running, have the lead call AskUserQuestion.
  4. Watch the Agent Dashboard: the lead never lands in (or quickly leaves) Needs You, despite the question prompt being open in the pane.
  5. Repeat with no teammate, or with a plain background subagent instead: the pane correctly stays in Needs You.

Expected

A lead that is blocked on the operator (AskUserQuestion, and presumably permission prompts) should be in Needs You regardless of teammates being busy. Waiting-on-user should take precedence over descendant "working" in the combined row state, or the teammate's activity should be attributed to its own row rather than the lead's.

Possibly related

Activity

  1. AmoabaKelvin commented on Oct 22, 2026

    @AmoabaKelvin
    Collaborator

    Fixed on main by #31780.

    Cause: in tmux mode Claude Code starts each teammate as a separate claude process in its own claude-swarm tmux server, launched from the lead pane, so the teammate inherits the lead's ORCA_PANE_KEY. Its hooks (SessionStart, PreToolUse/PostToolUse, Stop, TeammateIdle, SessionEnd) arrived on the lead's row with no agent_id and a different session_id, and Orca read them as the lead's own events. The teammate's SessionStart reset the lead to Done, and its next tool call set it to Working while the question was still open. #31780 keeps hooks from a second process of the pane owner's own provider off the owner's row.

    Checked with real Claude Code 2.1.307/2.1.308 hook captures and a hidden dev build of each side. Before the fix the lead went Needs permission, then Done, then Working, and its row label changed to the teammate's prompt. After it, the lead stayed in Needs You for the whole 90 seconds the teammate ran Bash calls, and settled to Done once answered.

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

    os:linuxIssues affecting Linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions