Skip to content

feat(site/src/pages/AgentsPage/components/ChatElements/tools): show subagent isolation on the spawn and wait cards - #152

Merged
ibetitsmike merged 2 commits into
mainfrom
mike/subagent-isolation-7-tool-cards
Nov 10, 2026
Merged

ibetitsmike merged 2 commits into
mainfrom
mike/subagent-isolation-7-tool-cards

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #9. With experiment fork-subagent-isolation on, spawn_agent and wait_agent return where an isolated child works, and wait_agent also returns a summary of a worktree child's work. The tool cards didn't show any of it, so a user had to read the raw result to find the child's branch.

With the experiment on, the cards now show these fields below the header, so they stay visible while the card is collapsed:

  • A worktree child shows Branch: <branch> and Worktree: <path>. A long path is truncated, and the full path is in its tooltip.
  • A workspace child shows Workspace: <name>. If the server couldn't look up the workspace, the card shows its workspace_error as an error detail.
  • The wait_agent card of a worktree child that finished shows its diff_summary on one line, for example 2 commits, 3 files changed, +41 -7, 1 uncommitted change. The uncommitted part is left out when there are none. If the summary request failed, the card shows diff_summary_error as an error detail instead.

The wait_agent fields of fork-chat-todos (recent tool calls) still need that experiment, and the isolation fields now show without it. With fork-subagent-isolation off, the cards look as they did before.

Code

  • site/src/pages/AgentsPage/components/ChatElements/tools/ForkSubagentFields.tsx: IsolationFields and formatDiffSummary, gated on the experiment.
  • ForkSubagentFields.stories.tsx: stories for a worktree spawn (with the experiments on and off), a workspace spawn, a workspace spawn whose lookup failed, and a finished worktree wait with a summary and with a summary error.

Checks

biome check, oxlint, tsc and vitest run --project=unit src/pages/AgentsPage/components/ChatElements/tools (19 files, 301 tests) pass. The change adds no Vitest test: the fields have no interaction or state, and the stories cover each visual state. frontend-deep-review ran all eight roles; the second round, after fixes, has no findings.

UAT

Ran on 2026-11-10 with this branch's frontend (c20eecb615, Vite dev server) against the :3200 fork branch server (v2.39.1-devel+90e67455c6, fork-subagent-isolation on), as a member user, in a real chat on a Docker workspace. The chat spawned one child with isolation: worktree and repo_path, waited for it, then spawned and waited for one shared child.

  • Experiment on: the Waited for Worktree child card shows Branch: agent/worktree-child-41c6b0eb, Worktree: /home/coder/.coder/worktrees/proj/41c6b0eb-…, and 1 commit, 1 file changed, +1 -0, which match the wait_agent result (diff_summary.commits: 1). The shared child's cards show no isolation lines. Checked in light and dark themes.
  • Experiment off (the page's /api/v2/experiments response stubbed without fork-* experiments, server unchanged): the same chat renders the plain upstream cards with no branch, worktree, or diff lines.

Screenshots are kept with the UAT notes and are available on request.

…ubagent isolation on the spawn and wait cards

With experiment fork-subagent-isolation on, the spawn_agent and wait_agent
cards show the child's branch and worktree, or its workspace, and the
wait card shows the worktree's diff summary or the error that replaced it.
…dress frontend review of the isolation fields
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

@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-10T17:37:56.805517Z c20eecb 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: c20eecb615

ℹ️ 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 (748bdf76e2) 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 (748bdf76e2), 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 73169c3 into main Nov 10, 2026
22 of 29 checks passed
@ibetitsmike
ibetitsmike deleted the mike/subagent-isolation-7-tool-cards branch November 10, 2026 20:40
@ibetitsmike

Copy link
Copy Markdown
Owner Author

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

Merge evidence for head c20eecb615bcf10340fa004d8658b5fce7379dbe:

  • fork-ci pull_request run 42893299600 passed; its build job checked out Merge c20eecb615 into 748bdf76e2 (current main). Run 42866226395 had also passed on this head against its older base. All checks green.
  • Codex on this exact head: no major issues (comment 6774570865). 0 unresolved review threads.
  • Frontend deep review clean.
  • UAT with this frontend against the :3200 branch server, fork-subagent-isolation on, as a member user with a real chat on a Docker workspace: the "Waited for" card for a worktree child shows its branch, worktree path and "1 commit, 1 file changed, +1 -0", matching wait_agent's diff_summary; shared child cards show no isolation lines; light and dark themes checked. With the experiment off, the cards are the plain upstream ones.
  • No migration.

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