Skip to content

feat(web): show nested subagents in Lineage and their full parent chain - #13438

Closed
Bil0000 wants to merge 657 commits into
pingdotgg:t3code/codex-turn-mappingfrom
Bil0000:feat/nested-subagent-lineage
Closed

Bil0000 wants to merge 657 commits into
pingdotgg:t3code/codex-turn-mappingfrom
Bil0000:feat/nested-subagent-lineage

Conversation

@Bil0000

@Bil0000 Bil0000 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The V2 orchestrator supports nested subagents (a subagent can delegate to its own subagents), but the web UI shows them flat:

  • Lineage shows no hierarchy, so you cannot tell which subagent spawned which.
  • A deeply nested subagent only shows "Subagent of ", so the path back to the root is lost.

Fix

Lineage tree (web only). A subagent row with its own subagents gets a small chevron. It is collapsed by default. Expanding it shows the children, indented under thin tree guide lines, and each child can expand the same way. Rows open their thread like before.

Full parent chain. The "Subagent of" pill at the top of a subagent thread now shows every ancestor, root first (Root › Parent › Direct parent). Each part links to that thread.

The chat thread's subagent card is unchanged.

Shared logic lives in packages/client-runtime:

  • indexSubagentChildren and subagentAncestors (cycle-safe) in threadRelationships.ts.
  • subagentChildrenAtom and subagentAncestorsAtom in threadShell.ts. Both keep a stable reference, so a row re-renders only when its own children change.

Mobile has no Lineage panel, so there is no mobile change.

Screenshots

Before After
Lineage before: no hierarchy Lineage collapsed: chevrons on rows with nested subagents
Lineage expanded two levels with tree guide lines
Before After
Breadcrumb before: only the direct parent Breadcrumb after: full parent chain

Inside a nested subagent's thread. The breadcrumb shows the full parent chain, and Lineage shows its parent, the root, and its own subagents:

Nested subagent thread: full parent chain on top, Lineage on the right

Verification

  • vp test run apps/web/src/components/chat packages/client-runtime/src/state/threadRelationships.test.ts passes, including new tests for child indexing, ancestor order, and cycle safety.
  • tsc --noEmit passes for apps/web and packages/client-runtime.
  • Checked by hand in a dev build with copied real thread data: expand and collapse at two levels, open a nested row, and follow breadcrumb links.

Risks

  • The existing Lineage list is unchanged; the tree only adds children under rows that have them. A nested subagent can therefore appear both at the top level and under its parent.
  • Only the web client changes.

Claude Opus 5.5, Claude Code in T3 Code

juliusmarminge and others added 30 commits September 23, 2026 20:58
…gg#9897)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ingdotgg#8464)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
…gg#9907)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
…otgg#9905)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…gg#9928)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…dotgg#9920)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ngdotgg#10051)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
juliusmarminge and others added 17 commits September 23, 2026 20:59
…erk bridge (pingdotgg#13204)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
A subagent row in Lineage now has a chevron when that agent spawned its
own subagents. Nested agents start collapsed and each level opens on its
own, with tree guide lines under the parent.
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 24, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new production UI capability spanning lineage state derivation, recursive nested-subagent rendering, and full parent-chain navigation. The cross-layer behavior change is broader than a small isolated UI tweak, while the remaining UI comment is limited to shared-primitive consistency.

You can add or adjust custom eligibility rules. Learn more.

@Bil0000
Bil0000 force-pushed the feat/nested-subagent-lineage branch from 3ac309c to 20a5fa3 Compare September 24, 2026 15:25
The "Subagent of" divider now lists every agent above the current one,
root first, and each link opens that thread.
@Bil0000
Bil0000 force-pushed the feat/nested-subagent-lineage branch from 20a5fa3 to bd67ffd Compare September 24, 2026 15:28
@macroscopeapp

This comment has been minimized.

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 6448cfe to 1563a64 Compare September 24, 2026 23:21
@Bil0000 Bil0000 closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.