-
Notifications
You must be signed in to change notification settings - Fork 6.5k
support MCP elicitations #6947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support MCP elicitations #6947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
|
@codex review |
codex-rs/exec/src/lib.rs
Outdated
| if matches!(event.msg, EventMsg::Error(_)) { | ||
| error_seen = true; | ||
| } | ||
| if let Some((server_name, request_id)) = elicitation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not handle this in the above match statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
| let action = match decision { | ||
| ElicitationDecision::Accept => ElicitationAction::Accept, | ||
| ElicitationDecision::Decline => ElicitationAction::Decline, | ||
| ElicitationDecision::Cancel => ElicitationAction::Cancel, | ||
| }; | ||
| let response = ElicitationResponse { | ||
| action, | ||
| content: None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t send empty elicitation payloads
When the user accepts an elicitation request we still build the response with content: None, so the MCP server never receives the data it asked for via CreateElicitationRequestParam.requested_schema. For any request that actually needs user input (the normal case), the server will either reject the response or stall because we claimed to “provide the requested info” (see approval_overlay.rs:506-524) but sent an empty payload. We either need to collect the requested fields before returning or stop offering the accept option until we can supply content.
Useful? React with 👍 / 👎.
gpeal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty clean to me although I haven't had time to read too deeply. What would happen if an elicitation comes in when using app server and the client doesn't support elicitaitons?
No support for request schema yet, but we'll at least show the message and allow accept/decline.