Add user_input_requested_during_turn to MCP turn metadata#22237
Merged
mchen-oai merged 2 commits intoMay 15, 2026
Conversation
user_input_requested_during_turn to MCP turn metadata
b36c34e to
45eb23b
Compare
cb1ea1f to
cbd6fe0
Compare
23a536b to
0386088
Compare
6ae5307 to
4362a82
Compare
owenlin0
approved these changes
May 14, 2026
ccb38a0 to
45a23ce
Compare
45a23ce to
88ea41c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
_meta["x-codex-turn-metadata"]with various key values.What Changed
user_input_requested_during_turnwhen a model-visiblerequest_user_inputcall happened earlier in the turn, propagated in_meta["x-codex-turn-metadata"].mark_turn_user_input_requested()is called when user input is requested through either MCP elicitation (mcp.rs) or therequest_user_inputtool (mod.rs)._metais now built immediately before execution (mcp_tool_call.rs) so user input requested earlier in the same turn, including within the same tool call via elicitation, is reflected in the metadata./responsesturn metadata headers are unchanged.Verification
codex-rs/core/src/session/mcp_tests.rscodex-rs/core/src/tools/handlers/request_user_input_tests.rscodex-rs/core/src/turn_metadata_tests.rscodex-rs/core/tests/suite/search_tool.rs