Skip to content

feat(agents): message a Codex subagent straight from its transcript - #195

Merged
badcuban merged 1 commit into
mainfrom
feat/agent-direct-input
Aug 28, 2026
Merged

feat(agents): message a Codex subagent straight from its transcript#195
badcuban merged 1 commit into
mainfrom
feat/agent-direct-input

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

A spawned Codex agent could only be read. Steering it meant asking the parent to relay, and the parent does not always listen.

What changed

  • The agent drill-in in the Agents tab ends in a one-line composer while the agent is live: "Message ". Enter sends, Shift+Enter breaks a line. The reply lands in the transcript above like any other turn, so the composer only ever shows a failure.
  • New server.sendSubagentInput RPC (contracts, ws handler, ProviderService) routed to an optional adapter method.
  • Codex adapter: authorizes the target thread against the session's root with the same ancestry walk the transcript read uses (now a shared helper), refuses threads the app-server marks canAcceptDirectInput: false, then starts a turn on the child thread via turn/start.
  • Claude has no host-side way to reach a subagent (only the model can, through SendMessage), so the composer stays hidden for Claude threads.

Testing

  • Typecheck clean in contracts, server, web.
  • Codex adapter: new test sends to an authorized child (turn/start called with the child id and text, turn id returned) and refuses a child that does not accept direct input before any turn starts.
  • Agents panel browser suite 38/38, including two new tests: the composer sends and clears for a Codex agent; it is absent for a Claude agent.
  • Not verified against a live Codex subagent yet. Worth one manual run in the dev app before merging.

A spawned Codex agent could only be read. Steering it meant asking the
parent to relay, and the parent does not always listen.

The agent drill-in in the Agents tab now ends in a one-line composer
while the agent is live. Enter sends; the reply lands in the transcript
above like any other turn. A new server.sendSubagentInput RPC routes to
the provider adapter; the Codex adapter authorizes the thread against
the session's root (the same ancestry walk the transcript read uses,
now shared), refuses threads the app-server marks as not accepting
direct input, and starts a turn on the child thread. Claude has no
host-side way to reach a subagent, so the composer stays hidden there.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
threadlines Skipped Skipped Aug 28, 2026 4:10pm

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Aug 28, 2026
@badcuban
badcuban merged commit e038ffa into main Aug 28, 2026
16 checks passed
@badcuban
badcuban deleted the feat/agent-direct-input branch August 28, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 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