Skip to content

[elicitation] Advertise new url elicitation capability when auth_elicitation is enabled.#22188

Merged
mzeng-openai merged 2 commits into
mainfrom
dev/mzeng/auth_elicit_capability
May 11, 2026
Merged

[elicitation] Advertise new url elicitation capability when auth_elicitation is enabled.#22188
mzeng-openai merged 2 commits into
mainfrom
dev/mzeng/auth_elicit_capability

Conversation

@mzeng-openai
Copy link
Copy Markdown
Collaborator

@mzeng-openai mzeng-openai commented May 11, 2026

Why

We've added support for auth elicitation behind the auth_elicitation flag, but servers need to explicitly check the capability before it decides to send elicitations in order to be backward compatible. This PR adds the capability advertising conditioned on the flag.

What changed

  • Build client_elicitation_capability from the AuthElicitation feature state.
  • Thread that capability through MCP config, session startup, and McpConnectionManager so RMCP initialization advertises the correct elicitation support.
  • Advertise both form and url elicitation when the feature is enabled, and preserve the empty default capability when it is disabled.
  • Add coverage for the feature-derived config shape and the advertised initialization payload.

Testing

  • cargo test -p codex-mcp
  • cargo test -p codex-core to_mcp_config_preserves_auth_elicitation_feature_from_config
  • cargo test -p codex-core (currently fails outside this change in tools::handlers::multi_agents::tests::tool_handlers_cascade_close_and_resume_and_keep_explicitly_closed_subtrees_closed with a stack overflow after unrelated tests have started running)

…_capability

# Conflicts:
#	codex-rs/core/src/config/config_tests.rs
@mzeng-openai mzeng-openai marked this pull request as ready for review May 11, 2026 19:02
@mzeng-openai mzeng-openai requested a review from a team as a code owner May 11, 2026 19:02
@mzeng-openai mzeng-openai merged commit 192481d into main May 11, 2026
26 checks passed
@mzeng-openai mzeng-openai deleted the dev/mzeng/auth_elicit_capability branch May 11, 2026 19:23
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 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.

3 participants