Fix code-mode deferred app tool routing#22273
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cea2da0925
ℹ️ 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".
| session: Arc::clone(session), | ||
| turn: Arc::clone(turn), | ||
| }; | ||
| let router = Arc::new(build_nested_router(&exec).await); |
There was a problem hiding this comment.
Preserve app tool filtering for nested calls
When CodeMode runs with Apps enabled and an app or app tool is disabled by config, this new router rebuild bypasses the per-turn MCP exposure filtering in built_tools that calls codex_app_tool_is_enabled. build_nested_router registers the raw list_all_tools() output instead, so model-authored JavaScript can now dispatch disabled Codex app MCP tools through tools[...]/ALL_TOOLS rather than having the already-built filtered router reject them; the nested router should be built from the same filtered/deferred exposure set while still allowing eligible deferred tools.
Useful? React with 👍 / 👎.
006b4b3 to
364f514
Compare
Summary
Test plan