Skip to content

fix: a delegated agent's secret request reaches the coordinator's thread - #22

Merged
OmarAlex24 merged 2 commits into
feat/milestones-last-actionfrom
fix/milestones-child-secret
Nov 11, 2026
Merged

OmarAlex24 merged 2 commits into
feat/milestones-last-actionfrom
fix/milestones-child-secret

Conversation

@OmarAlex24

@OmarAlex24 OmarAlex24 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Problem

When a delegated agent called request_secret, its own thread showed the card and Needs you, but the coordinator's thread never learned that it was waiting. In one live run, a child waited about five minutes for a secret nobody could see. This is the known gap in #17.

The cause: the shell stream drops a subagent's turn-item events, and a secret or link card exists only as a turn item. So the parent's client never refetched the child's shell.

Fix

  • Server. A subagent's secret_request and link_request items now pass the shell stream filter, like the runtime requests that carry approvals. The child's shell then reports that it is waiting on you.
  • Client. While a child waits on input, createChildThreadSecretRequestsAtom reads that child's turn items and takes its waiting secret card. It reads nothing once no child is waiting.
  • Web. The coordinator's thread shows the card above the composer, next to child approvals. The card is bound to the child's environment and thread, so Save securely answers the child directly.

Notes

  • Link requests. A child's link request now reaches the parent's shell too, but only secret cards are shown in the coordinator. Link cards keep to the child's thread.
  • Mobile. Mobile shows child approvals in the coordinator but not child secrets yet. The atom lives in client-runtime, so mobile can reuse it.
  • Attribution. This layer shows the card as is. The next layer (feat(web): milestones become a map of plans, detours and agents #23) adds which agent asked and in which milestone.

Test plan

  • ShellStream.test.ts: a subagent's secret or link card publishes its shell so its parent hears it waits on you
  • threadRequests.test.ts: with a saved and a pending card, only the pending one reaches the parent. Once the child stops waiting the list empties without reading the child's items again.
  • ChildThreadApprovals.browser.test.tsx stubs the new atom. Run at the top of the stack, where feat(web): milestones become a map of plans, detours and agents #23 renames it AgentAsks.browser.test.tsx, it passes.
  • Dev app at the top of the stack (feat(web): milestones become a map of plans, detours and agents #23), with real Haiku agents: a delegated agent asked for DEMO_TOKEN. The card appeared in the coordinator's thread, and answering there unblocked the child, which finished its milestone.

Built with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

@OmarAlex24
OmarAlex24 added this pull request to stack #24 November 11, 2026 19:11
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 11, 2026
@OmarAlex24 OmarAlex24 changed the title fix/milestones child secret fix: a delegated agent's secret request reaches the coordinator's thread Nov 11, 2026
@OmarAlex24 OmarAlex24 added the agent-context-increase Accepts a deliberate increase in the agent context budget label Nov 11, 2026
@OmarAlex24
OmarAlex24 marked this pull request as ready for review November 11, 2026 19:37
@OmarAlex24
OmarAlex24 force-pushed the fix/milestones-child-secret branch from b0e2a93 to 957ecc4 Compare November 11, 2026 19:47
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 957ecc4.

This comment will update automatically after the next completed run.

OmarAlex24 and others added 2 commits November 11, 2026 14:46
The shell stream drops a subagent's turn-item events, and a secret or link
card is recorded only as a turn item, so the parent's client never refetched
the child's shell and never saw it wait on the user. Those cards now pass the
filter, like the runtime requests that carry approvals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While a child waits on input, the parent subscribes to its detail, takes its
waiting secret card and shows it above the composer next to child approvals,
bound to the child's environment and thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OmarAlex24
OmarAlex24 force-pushed the fix/milestones-child-secret branch from 957ecc4 to 1813b14 Compare November 11, 2026 20:47
@OmarAlex24
OmarAlex24 merged commit 193e263 into feat/sandbox-environments Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accepts a deliberate increase in the agent context budget size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant