mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
Ask question tool
This commit is contained in:
@@ -29,6 +29,7 @@ use mcp_types::RequestId;
|
||||
use mcp_types::TextContent;
|
||||
use serde_json::json;
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::warn;
|
||||
|
||||
pub(crate) const INVALID_PARAMS_ERROR_CODE: i64 = -32602;
|
||||
|
||||
@@ -262,6 +263,19 @@ async fn run_codex_tool_session_inner(
|
||||
// TODO: forward elicitation requests to the client?
|
||||
continue;
|
||||
}
|
||||
EventMsg::AskUserQuestionRequest(ev) => {
|
||||
// Auto-resolve to prevent tool calls from hanging in MCP mode.
|
||||
if let Err(err) = thread
|
||||
.submit(Op::ResolveAskUserQuestion {
|
||||
id: ev.id,
|
||||
answers: Vec::new(),
|
||||
})
|
||||
.await
|
||||
{
|
||||
warn!("failed to auto-resolve ask-user-question request: {err}");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
EventMsg::ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent {
|
||||
call_id,
|
||||
turn_id: _,
|
||||
|
||||
Reference in New Issue
Block a user