Skip to content

feat: show async Codex questions as elicitations - #707

Merged
EugeneTheDev merged 3 commits into
mainfrom
eugenethedev/async-elicitation-fix
Oct 29, 2026
Merged

EugeneTheDev merged 3 commits into
mainfrom
eugenethedev/async-elicitation-fix

Conversation

@EugeneTheDev

@EugeneTheDev EugeneTheDev commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Codex's request_user_input_async tool asks questions without waiting: it emits an agentMessage with delivery: "async" and questions, and the turn continues. The adapter dropped these messages, so Air showed nothing and the agent went on with its defaults (IJAI-4999).

Fix

  • Show agent messages that arrive whole, without deltas, so the question text appears live.
  • Send async questions as a non-blocking form elicitation. On ACP v2 the session state stays running while the form is open.
  • Steer an accepted answer into the turn that asked, in the reply envelope Codex clients use. Declining or cancelling sends nothing.
  • Cancel open elicitations with $/cancel_request when their turn ends, the session closes or the app-server is lost.
  • Drop an answer that arrives after its turn ended, as the Codex TUI does, and send a warning notice where the client supports notices.
  • On replay, show a stored answer as the quoted question followed by the answer, instead of the raw envelope.

Behaviour is documented in docs/async-questions.md. Tests cover ACP v1 and v2.

@EugeneTheDev
EugeneTheDev marked this pull request as ready for review October 29, 2026 18:03
@EugeneTheDev
EugeneTheDev merged commit cc57c7e into main Oct 29, 2026
6 checks passed
@EugeneTheDev
EugeneTheDev deleted the eugenethedev/async-elicitation-fix branch October 29, 2026 18:09
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.

1 participant