Skip to content

Native subagents: list them under their thread and open each one as a read-only view #5864

Description

@HugoVizcainoSantana

The workflow

I run orchestrator threads in bb (Claude Code and Codex). Besides bb child threads, those agents also start provider-native subagents: Claude Code's Agent/Task tool, often in the background, and Codex's spawn_agent. I want to:

  1. See from the sidebar which subagents a thread has started, which are still running and how long they've been at it, without opening the thread.
  2. Open one subagent and read what it did (its commands, reasoning and answer) as its own read-only view, while it runs and after it finishes.
  3. For Claude Code, stop a runaway background subagent.

What happens today

bb already has the data. Verified on 0.46.1:

  • Claude Code: each subagent is a delegation row whose childRows hold its steps. A ~7-minute background agent had 99 nested rows: 56 commands, reasoning and its final message.
  • Codex: translator.ts routes the receiver thread's events to the delegation through parentToolCallId:
    function observeCodexDelegationToolCall(
    delta: ThreadDelta,
    providerThreadId: string | undefined,
    ): void {
    const delegationToolCall = getCodexDelegationToolCall(delta);
    if (!delegationToolCall) {
    return;
    }
    for (const receiverThreadId of delegationToolCall.receiverThreadIds) {
    if (
    receiverThreadId === providerThreadId ||
    receiverThreadId === delegationToolCall.senderThreadId
    ) {
    enqueuePendingDelegationTurnLink({
    callId: delegationToolCall.callId,
    parentTurnId: getDeltaProviderTurnId(delta),
    providerThreadId,
    });
    continue;
    }
    delegationParentToolCallIdsByProviderThreadId.set(
    receiverThreadId,
    delegationToolCall.callId,
    );
    }
    if (delegationToolCall.receiverThreadIds.length === 0) {
    enqueuePendingDelegationTurnLink({
    callId: delegationToolCall.callId,
    parentTurnId: getDeltaProviderTurnId(delta),
    providerThreadId,
    });
    }

    A test thread that spawned one subagent showed the row live (pending, 0 rows), then completed with the child's command and answer, matching the Codex rollout.

What's missing is the way in:

  • The delegation row sits inside the collapsed "Worked for…" activity of its turn. Without includeNestedRows, the timeline does not even return it at top level.
  • The composer pill is not clickable (Composer's running-agents status bar isn't clickable, unlike the main timeline #2315).
  • There is no route, title or breadcrumb for a subagent, and the thread list has no place for subagents. The only signal is the backgroundAgents count, and only while one is running in the background.
  • Plugins have no roster API. To build a list, a plugin has to fetch threads.timeline({ includeNestedRows: "true", deferContent: "true" }) and walk it: about 190 KB for one long thread (630 KB without deferContent). Background Claude agents mark their delegation completed on launch, so "still running" has to be inferred by matching activeBackgroundCommands on the description text.
  • The timeline is paged (at most ~24 segments). A delegation whose turn started before the page boundary comes back in timelinePage.olderRowUpdates carrying only the child rows after the boundary. To read a whole subagent, a plugin has to walk olderCursor back and merge the pieces. Older turns drop out of the page entirely, so a roster built from the timeline loses old subagents. For Claude we recover them from events.list({ types: ["item/delegation/completed"] }). Codex delegations only emit the generic item/completed, so there is no cheap way to recover them.
  • Codex subagents are labelled with their internal agent path (/root/visibilidad_docs): the delegation label is agentPath, and the spawn prompt never reaches the timeline. T3 Code keeps the prompt and shows it as the subagent's first message.

What I would expect

  1. Read-only subagent view. Opening a delegation shows its own page: the nested timeline with title, status, model/type and duration, a breadcrumb to the parent, and no composer ("runs on its own"). It should update live while the subagent runs. Claude Code also gets a Stop button.
  2. Thread list. Subagents appear as leaves under their parent thread: running ones first, recent finished ones behind a "N earlier" toggle. They are visually distinct from bb child threads and never show "needs you", since they can't ask anything.
  3. SDK. A threads.subagents(threadId) roster (id/childRef, label, type, model, background, status, startedAt, completedAt, usage) with realtime updates, plus a way for ThreadChat (or a sibling component) to render one subagent's rows.

Prior art: T3 Code models each provider-native subagent as a read-only child thread: its own route, a breadcrumb to the parent, a "Runs on its own" bar instead of the composer, and Stop for Claude only. It also has a "Lineage" panel listing active and previous subagents.

Prototype and offer

We built a first version inside our own plugin (the factory plugin, which replaces the thread list). It covers points 1 and 2 from the nested timeline:

  • Leaves: subagent leaves under each thread, with label, type/model, running time, and tokens and tool uses while running.
  • Read-only page per subagent: breadcrumb to the parent, status, the prompt (when the provider gives it), reasoning, each command with its output collapsed, and the final answer. It refreshes every few seconds while the subagent runs.

We'd like to know which way you prefer:

  • (a) points 1–3 in core, where we can help with a PR once the design is agreed; or
  • (b) an official "subagent viewer" plugin built on a roster SDK API (point 3). Point 2 can't be done from a plugin today: plugins can decorate rows of the built-in thread list (experimental_setThreadRowStatus) but can't add child rows to it.

Related

AGENT GENERATED

Activity

  1. added
    threads
    ui
    provider-claude-code
    provider-codex
    on Oct 20, 2026
  2. bb-slop-cop commented on Oct 20, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied and verified the missing classification:

    • Type: Feature
    • Priority: Medium — meaningful visibility improvements, with existing timeline and plugin workarounds.
    • Effort: High — new navigation, live roster/API contracts, and cross-provider lifecycle handling require design work.
    • Labels: threads, ui, provider-claude-code, provider-codex.

    No existing classifications needed preservation; no write conflicts occurred. Final Type re-read: Feature. Reproduction report and fix skipped: this requests new functionality, and a safe implementation requires product/API design decisions.

  3. jorgitin02 commented on Oct 23, 2026

    @jorgitin02

    A small piece of this that could ship before the read-only view: show the model on the inline delegation row.

    Workflow: On iOS, a Claude Code thread launches subagents with the Agent tool. The only thing I see is the row Delegating: <description> (<subagentType>). I cannot tell if a subagent runs on Opus, Sonnet or Haiku without opening anything. T3 Code shows the model next to each subagent.

    Today (bb 0.46.1): The delegation work row schema has toolName, childRef, background, subagentType, description, output, childRows. It has no model field. The renderer appends only (${subagentType}). Plugins (Agent Board, agent-graph) read the same row, so they cannot show the model either.

    Expected:

    1. Add an optional model: string | null to delegation rows. The model in the roster proposed above could reuse the same field.
    2. Claude Code: fill it from the Agent tool's model input. If that is not set, use the subagent definition's model: frontmatter. If neither is set (or it is inherit), use the parent thread's model. Other providers: their equivalent, or null.
    3. Render it on the row, for example Delegating: Review the diff (code-reviewer · sonnet), visible on mobile without opening the row.
    4. If bb only knows the requested model, not the one that actually ran, label it that way, or show it only when it differs from the parent.

    AGENT GENERATED

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

    provider-claude-codeprovider-codexthreadsui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions