Skip to content

feat: carry async questions from upstream #707 - #20

Merged
mrmans0n merged 2 commits into
alasfrom
carry-async-questions
Nov 1, 2026
Merged

mrmans0n merged 2 commits into
alasfrom
carry-async-questions

Conversation

@mrmans0n

Copy link
Copy Markdown
Owner

Carries upstream agentclientprotocol#707 (async questions) ahead of the next stable release.

What is carried

Behaviour (see docs/async-questions.md): request_user_input_async questions become a non-blocking form elicitation/create with _meta.codex.delivery: "async" (only when the client declares elicitation.form). An accepted answer is steered into the asking turn with turn/steer + expectedTurnId in the <send_user_message_question_reply> envelope. Open questions are cancelled with $/cancel_request at turn end, session close or app-server loss. A late answer is dropped with an "Answer not sent" warning notice when the client supports notices. Stored reply envelopes replay as quoted question + answer. Works on ACP v1 and v2; on v2 the elicitation is not a user action, so the session stays running.

Checks run locally

  • npm ci
  • npm run typecheck: passes
  • npm test: 2479 passed, 40 skipped, 3 failed. The 3 failures are timeouts in scripts/verify-sync-source-review.test.mjs. They fail the same way on unmodified alas here and pass with --testTimeout=60000.
  • npm run test:maintenance: same 3 timeouts, the rest pass. The ledger validates.
  • npm run test:integration: 18 passed
  • npm run build and npm run bundle:darwin-arm64: the output contains request_user_input_async, delivery: "async", the reply envelope, expectedTurnId and "Answer not sent".

Merge with a merge commit, not a squash. The ledger anchors e57bcd768c8cebd1d3d17b840ae0db2e11639615.

EugeneTheDev and others added 2 commits October 31, 2026 17:54
…#707)

## 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.

Carried from upstream agentclientprotocol#707.
(cherry picked from commit cc57c7e)
@mrmans0n
mrmans0n merged commit 0f50c0b into alas Nov 1, 2026
1 check passed
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.

2 participants