Skip to content

Support generic ACP elicitation/create for structured input#295

Open
whats0Wong wants to merge 2 commits into
zed-industries:mainfrom
whats0Wong:fix/generic-acp-elicitation-create
Open

Support generic ACP elicitation/create for structured input#295
whats0Wong wants to merge 2 commits into
zed-industries:mainfrom
whats0Wong:fix/generic-acp-elicitation-create

Conversation

@whats0Wong
Copy link
Copy Markdown

@whats0Wong whats0Wong commented May 16, 2026

Summary

  • Forward generic MCP form/url elicitation requests to ACP clients via elicitation/create when the client advertises matching elicitation capabilities.
  • Preserve the existing MCP tool approval mapping to session/request_permission.
  • Convert ACP elicitation responses back into Codex Op::ResolveElicitation, including action, content, and _meta.
  • Add coverage for both form-mode and url-mode forwarding.

Notes

  • Unsupported generic elicitations continue to be auto-declined.
  • RFC alignment boundary: this PR implements the elicitation/create form/url forwarding path and capability-gated behavior. It does not send ACP elicitation/complete notifications yet, because the current Codex generic MCP elicitation event/Op flow exposed to codex-acp provides ElicitationRequest + ResolveElicitation, but not a separate URL out-of-band completion hook. Therefore URL-mode user consent is handled through the elicitation/create response, while a future upstream completion signal would be needed for a fully accurate elicitation/complete bridge.

Tests

  • cargo fmt --check
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • git diff --check

Closes #294

Real validation with helix

Validated the generic form and url elicitation paths against code.byted.org/devinfra/helix on origin/feat/acp-elicitation-worker using a real local codex-acp process over ACP stdio and a real MCP stdio server.

The validation confirmed the full create/resolve flow: initialize advertises clientCapabilities.elicitation.form and clientCapabilities.elicitation.url, session/new and session/prompt succeed, the MCP server issues generic elicitation/create, codex-acp forwards ACP elicitation/create, helix emits WorkerSignalKindElicitationRequest, helix ResolveElicitation replies with accept, and Codex completes the MCP tool call/end turn.

This also exposed and this PR now fixes the real-event routing case where Codex emits MCP generic elicitation with event id mcp_elicitation_request instead of the prompt submission id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support generic ACP elicitation/create for structured user input

2 participants