Skip to content

feat(site/src/pages/AgentsPage): show fork fields on the subagent tool cards - #120

Merged
ibetitsmike merged 1 commit into
mainfrom
mike/fork-tool-cards-3-subagent-fields
Nov 10, 2026
Merged

ibetitsmike merged 1 commit into
mainfrom
mike/fork-tool-cards-3-subagent-fields

Conversation

@ibetitsmike

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #74 (third of three PRs, after #87 and #97).

The fork experiments add fields to the spawn_agent, wait_agent and list_agents results that the upstream subagent cards drop. The cards now show them, each behind the experiment that produces it:

  • list_agents rows: " · waiting for capacity" when a child waits for a subagent concurrency slot (fork-nested-subagents), and " · 1/3 todos done" when a child has todos (fork-chat-todos).
  • spawn_agent: "Agent type: w9-reviewer" when the call spawned a custom agent definition, that is a type the card's built-in variants do not cover (fork-agent-definitions). A spawn the nested-subagent limits rejected shows the server's error text, for example "cannot create a child agent: this chat family has 2 live subagents and the maximum is 2" (fork-nested-subagents).
  • wait_agent: "2 recent tool calls", expandable to one line per call with its tool name, a "failed" marker and its arguments, plus the tool_calls_error text when the server could not read them (fork-chat-todos). These render outside the card's collapsed content, so a wait that timed out without a report still shows what the child was doing.

With the experiments off, the cards look exactly like upstream.

Hook footprint in upstream files: ListAgentsTool.tsx gets one <ForkListAgentFields agent={rec} /> slot in the row (plus its import), SubagentTool.tsx gets a forkCall prop and one <ForkSubagentFields> slot between the recording preview and the card content, and Tool.tsx's SubagentRenderer passes forkCall={{ args, result }}. The fields live in the new ForkListAgentFields.tsx and ForkSubagentFields.tsx. forkToolUtils.ts gains useForkExperiment, which the existing renderer gate now uses too, and parseChatTodo, moved from ForkTodoTool.tsx so the list rows can reuse it.

Tests

  • ForkSubagentFields.stories.tsx: ListAgents, ListAgentsExperimentsOff, SpawnCustomType, SpawnLimitError, WaitRecentToolCalls, WaitToolCallsError. Visual states only, for Pixel.

Local: pnpm lint, tsc, unit Vitest for ChatElements/tools (301 tests), Storybook Vitest for ForkSubagentFields.stories, ForkTodoTool.stories and Tool.stories (172 tests).

UAT

Dev frontend at this head against a local fork server with all three experiments, member chats on a real model making real calls (no seeded rows). One chat spawned a w9-reviewer agent definition: the spawn card shows "Agent type: w9-reviewer", the wait card shows "2 recent tool calls" expanding to both calls, and the list_agents row shows "1/3 todos done". In a second chat, with the organization's subagent limits briefly lowered, a third spawn shows the server's live-limit error and the list_agents row of the child that waits for a concurrency slot shows "waiting for capacity". Checked in dark and light themes. With the experiment list served without the fork experiments, both chats show upstream's cards.

…l cards

list_agents rows show a child waiting for a concurrency slot and its todo progress. spawn_agent shows a custom agent type and the error text of a refused spawn, and wait_agent lists the child's recent tool calls. Each field shows only while the experiment that adds it is on.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T07:30:50.913377Z b7cc018 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b7cc0181cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this on behalf of @ibetitsmike.

Closing and reopening only to make GitHub recompute the merge ref against current main (24fcb8445d) and run fork-ci on it. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this again on behalf of @ibetitsmike.

The merge ref now points at current main (24fcb8445d), but the run started by the first reopen was queued against the old merge ref. This second reopen starts fork-ci on the recomputed merge. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike
ibetitsmike merged commit c5d79e0 into main Nov 10, 2026
21 of 28 checks passed
@ibetitsmike
ibetitsmike deleted the mike/fork-tool-cards-3-subagent-fields branch November 10, 2026 07:59
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head b7cc0181cba0f64792f224ea3e478fb2cf55bea1:

  • fork-ci pull_request run 42777076375 passed; its build job checked out Merge b7cc0181cb into 24fcb8445d (current main). All checks green. Run 42775454864 had also passed on this head (agent-sdk, build, chat-tests, forkdb, graph, schema, site).
  • Codex on this exact head: no major issues (comment 6761679659, review-state summary 6761633943). 0 unresolved review threads.
  • UAT PASS at this head (PR description): a dev frontend against a local fork server with all three experiments, member chats on a real model. A custom w9-reviewer spawn card shows "Agent type: w9-reviewer", the wait card shows "2 recent tool calls" expanding to both calls, and the list_agents row shows "1/3 todos done". With the organization's subagent limits briefly lowered, a third spawn shows the server's live-limit error and the waiting child's list_agents row shows "waiting for capacity". With the experiments off, the cards match upstream. Visual states are covered by the ForkSubagentFields stories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant