Ask question tool

This commit is contained in:
Charles Cunningham
2026-01-19 23:42:13 -08:00
parent a09711332a
commit c261d45ece
23 changed files with 1052 additions and 0 deletions
@@ -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: _,