mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Keep MCP user interaction on the root thread (#46066)
## Why MCP requests that need human input, including browser sign-in, must be handled by the root thread. Subagents need guidance to hand these blockers to their parent without prompting the user or automatically accepting requests that require input. ## What changed - Reject interactive MCP elicitations and tool approval prompts in subagents with guidance to ask the parent and wait before retrying. - Recognize browser authentication and `codex_requires_user_input` metadata even when the form schema is empty, while preserving automatic permission approvals and review decisions. - Carry user-interaction eligibility through MCP runtime creation and connection reuse, and guard prompt registration. - Preserve connector authentication diagnostics alongside handoff guidance, subject to normal tool-output limits. ## Testing Add unit and integration coverage for blocked subagent prompts, root browser authentication, automatic approval and review, connection reuse, and authentication diagnostic preservation and truncation. Add a request-history snapshot for browser-auth handoff guidance. GitOrigin-RevId: 83e146b6e5c1a2a22a34681ad45615f504b3c96c
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
/// form-forwarding safeguards.
|
||||
pub const APPROVAL_KIND_KEY: &str = "codex_approval_kind";
|
||||
pub const APPROVAL_KIND_MCP_TOOL_CALL: &str = "mcp_tool_call";
|
||||
pub const APPROVAL_KIND_BROWSER_AUTH: &str = "browser_auth";
|
||||
pub const APPROVAL_KIND_TOOL_SUGGESTION: &str = "tool_suggestion";
|
||||
/// Marks requests that need user input even when their form schema is empty.
|
||||
pub const REQUIRES_USER_INPUT_KEY: &str = "codex_requires_user_input";
|
||||
pub const REQUEST_TYPE_KEY: &str = "codex_request_type";
|
||||
pub const REQUEST_TYPE_APPROVAL_REQUEST: &str = "approval_request";
|
||||
pub const STRICT_AUTO_REVIEW_KEY: &str = "codex_strict_auto_review";
|
||||
|
||||
Reference in New Issue
Block a user