Files
codex/codex-rs/history
rhan-oai ea5f6b303c Recognize host-selected MCP handoffs in Guardian context (#65325)
## Why

Guardian uses native collaboration calls to identify which root-thread
context is relevant to a subagent. When an MCP server supplies those tools,
Guardian needs the server's registration to distinguish a handoff from an
unrelated call with the same name.

## What changed

Let the host opt in to handoff tracking for one local MCP plugin or extension
registration. Match the server name, source, and transport against the tool
registration used for routing. Persist the recipient of a matching direct
`spawn_agent`, `send_message`, or `followup_task` proposal so Guardian can
apply the handoff boundary when selecting context for that subagent.

Record a classification without a recipient for lookalike calls when needed
to prevent fallback to native name matching.

## Testing

Cover context filtering for the selected extension, calls without host
opt-in, and a configured MCP server using the native collaboration namespace.

GitOrigin-RevId: 40471f3cdfde88832c27c3a466e36723e42515d2
2026-12-02 20:09:58 +00:00
..