Expose a bounded external notify event for MCP elicitation requests
What problem does this solve?
When an MCP server requests structured elicitation, Codex surfaces the request in its native UI but does not expose a bounded external notification event. Operators using an external attention channel can therefore miss a form or URL elicitation while the session waits.
This should remain an attention signal, not a second approval/input runtime. The native elicitation event and UI must stay authoritative.
Proposed contract
Emit a detached, fail-open notification immediately before the native elicitation event, using the existing notify argv seam:
{type:mcp-elicitation-request,server-name:github,request-mode:form}
Supported modes:
formopenai/formurl
The payload should intentionally exclude question text, requested schema, URL, request ID, cwd, client, and session/turn identifiers. Server names should be bounded. A notification process failure or non-zero exit must never prevent delivery of the native elicitation event.
Tested implementation
Implementation commit: https://github.com/trevi00/codex/commit/dbd9eed
Branch: https://github.com/trevi00/codex/tree/feat/mcp-elicitation-postcompact-context
The integration test asserts the exact minimized payload, makes the notify process exit non-zero, and verifies that the native elicitation event still arrives. Form, OpenAI form, and URL mappings are exhaustive. The focused changed-seam suite passed 11/11, and the changed MCP test also passed in the 11,973-test full workspace run.
I understand external PRs are invitation-based. If maintainers want this contribution, please invite me to open a PR; I can split the MCP change from the PostCompact work if preferred.