Skip to content

core: box multi-agent wrapper futures#19059

Merged
bolinfest merged 1 commit intomainfrom
codex/windows-stack-multi-agents-boxing
Apr 23, 2026
Merged

core: box multi-agent wrapper futures#19059
bolinfest merged 1 commit intomainfrom
codex/windows-stack-multi-agents-boxing

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

Why

While debugging the Windows stack overflows we saw in #13429 and then again in #18893, I hit another overflow in tools::handlers::multi_agents::tests::tool_handlers_cascade_close_and_resume_and_keep_explicitly_closed_subtrees_closed.

That test drives the legacy multi-agent spawn / close / resume path. The behavior was fine, but several thin async wrappers were still inlining much larger AgentControl futures into their callers, which was enough to overflow the default Windows stack.

What

  • Box the thin AgentControl wrappers around spawn_agent_internal, resume_single_agent_from_rollout, and shutdown_agent_tree.
  • Box the corresponding legacy multi_agents handler calls in spawn, resume_agent, and close_agent.
  • Keep behavior unchanged while reducing future size on this call path so the Windows test no longer overflows its stack.

Testing

  • cargo test -p codex-core --lib tools::handlers::multi_agents::tests::tool_handlers_cascade_close_and_resume_and_keep_explicitly_closed_subtrees_closed -- --exact --nocapture
  • cargo test -p codex-core (this still hit unrelated local integration-test failures because codex.exe / test_stdio_server.exe were not present in this shell; the relevant unit tests passed)

@bolinfest bolinfest requested a review from a team as a code owner April 23, 2026 00:23
Copy link
Copy Markdown
Contributor

@eternal-openai eternal-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@bolinfest bolinfest merged commit 3cc3763 into main Apr 23, 2026
25 checks passed
@bolinfest bolinfest deleted the codex/windows-stack-multi-agents-boxing branch April 23, 2026 00:48
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants