Skip to content

Claude Code subagent transcripts aren't clickable: outputFile is dropped before it reaches the UI #2314

Open

Description

@technicalpickles

The workflow

When a Claude Code thread runs the Agent tool as a background task (the local_subagent/backgroundTask path, distinct from the inline delegation tree that Explore-style subagents use), I want to click through from the collapsed one-line summary in the thread timeline into that subagent's full transcript, the same way the delegation work-kind already lets you drill into a subagent's child rows.

What happens today

The subagent's full transcript exists on disk as a real JSONL file and bb already threads a pointer to it most of the way through the pipeline:

  • packages/domain/src/provider-event.ts defines outputFile on the background task schema.
  • plugins/provider-claude-code/src/task-translation.ts populates it from the Claude Code SDK's message.output_file.
  • packages/provider-bridge-protocol/src/assembler/delta-assembler.ts (around line 757) carries outputFile through intact.

It then gets dropped. packages/thread-view/src/background-task-projection.ts copies every other field (summary, status, taskStatus, usage, error, etc.) in both applyBackgroundTaskItem and the initial EventProjectionWorkflowMessage construction, but never copies item.outputFile. It never reaches the TimelineRow/UI layer, so WorkflowWorkRowBody.tsx (around lines 22-28) renders only plain, non-interactive summary text when there's no workflow snapshot.

Verified against 9375a5495464c16fd9c3d03176add0a1dfca5172 on main by spawning a real subagent, then dumping bb thread log --self --format json --all and cross-referencing the emitted outputFile path against background-task-projection.ts and WorkflowWorkRowBody.tsx.

What I would expect

The timeline row for a completed Claude Code background subagent should be clickable (or expandable), opening the subagent's full transcript, the JSONL at outputFile parsed into the same childRows shape the delegation work-kind already renders, or opened as a file pane the way bb thread open <path> opens other files.

Context and alternatives

Precedent already exists in this codebase for the target UX: TimelineDetailScroll in apps/app/src/components/thread/timeline/ThreadTimelineRows.tsx (around lines 1376-1417) already renders a real nested TimelineRowsList for delegation work rows. This issue is scoped to the backgroundTask/outputFile path specifically; the other bb providers (Codex, Pi, ACP) don't use this concept at all, they resolve subagents straight to delegation rows.

Today, the only way to see this data is to grep the raw event log for outputFile and cat the JSONL by hand.

AGENT GENERATED

Activity

  1. added theissue type on Aug 23, 2026
  2. added
    ui
    providers
    provider-claude-code
    on Aug 23, 2026
  3. SawyerHood commented on Aug 24, 2026

    @SawyerHood
    Collaborator

    ---Auto-Generated---

    Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2314.html

    • Verdict: REPRODUCED · root-cause confidence: high
    • Root cause (short): packages/thread-view/src/background-task-projection.ts copies every backgroundTask item field except outputFile (both applyBackgroundTaskItem and the initial message), and neither EventProjectionWorkflowMessage nor timelineWorkflowWorkRowSchema define it, so the persisted transcript path (present in item/backgroundTask/completed) never reaches the timeline API/UI; additionally the background-agent lifecycle row is filtered out of delegation childRows (build-thread-timeline.ts isDelegationLifecycleChildRow), so the visible delegation row has no home for it either.
    • Proposed fix: (1) Add outputFile: string | null to EventProjectionWorkflowMessage and copy it in both places in background-task-projection.ts; (2) add outputFile: z.string().nullable() to timelineWorkflowWorkRowSchema (server-contract) and copy it in buildWorkflowWorkRow — server/app contract only, no HOST_DAEMON_PROTOCOL_VERSION bump needed since the daemon-side item already carries it; (3) because the lifecycle row is filtered out of delegation children, lift the filtered child's outputFile onto the delegation row as a nullable transcriptPath in build-thread-timeline.ts case "delegation"; (4) render an "O…
    • Caveats: Two peripheral claims in the issue are inaccurate: for a background Agent call the UI renders the delegation row ("Launched subagent …"), not WorkflowWorkRowBody — the backgroundTask lifecycle row is filtered out of delegation children (PR Fix prompt spelling menu, panel chrome, browser focus, and subagent rows #527); and the SDK does stream the subagent's own messages under parent_tool_use_id, so the delegation row already shows part of the transcript. The output_file…

    The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).

    AGENT GENERATED: by Claude Code

  4. added
    confirmed-repro
    on Aug 24, 2026
  5. HugoVizcainoSantana commented on Oct 20, 2026

    @HugoVizcainoSantana

    Confirmed still applicable on main at 9e5c8a9: background-task-projection.ts still does not copy outputFile.

    One data point that may change the priority: for Claude Code background agents, the delegation row already gets the subagent's steps in childRows (includeNestedRows=true). On a real run that was 56 commands, the reasoning and the final message, which matches the tool calls in the transcript. So the in-app view is mostly there, and the problem is reaching it (#2315).

    outputFile would still help as a "full transcript" link, since the nested rows are a projection and not the raw transcript. I'd suggest doing it together with #2315 rather than on its own.

    Related broader proposal: #5864.

    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

    confirmed-reproprovider-claude-codeprovidersui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions