Render Codex asynchronous questions with interactive answers - #336512
Open
Ryan Ewen (RyanEwen) wants to merge 3 commits into
Open
Ryan Ewen (RyanEwen) wants to merge 3 commits into
Ryan Ewen (RyanEwen) wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Stop can miss a newly started continuation, and subagent questions are routed to controls that cannot answer them.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Routes Codex asynchronous questions into the existing interactive question carousel while preserving turn continuity.
Changes:
- Adds async-question lifecycle and delivery handling.
- Integrates questions with Codex turn, stop, and disposal flows.
- Adds focused behavioral tests.
File summaries
| File | Description |
|---|---|
codexAsyncQuestions.ts |
Implements question state and answer delivery. |
codexAgent.ts |
Connects async questions to Codex events. |
codexAsyncQuestions.test.ts |
Tests controller behavior and races. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex's
request_user_input_asyncemits anagentMessagewithdelivery: "async"and structured questions. The current adapter treats that item as ordinary Markdown, leaving the question and suggested answers as text with no answer controls. This reproduces with the original VS Code 1.137.0 bundle and is independent of the feedback-review patch.Route these items to the existing question carousel, including free-text answers. Codex continues working while the controls are open. If its native turn completes first, retain the host turn until the user answers or skips. Explicit answers use native
turn/start, which steers active work or starts a continuation using the thread's existing settings. Ordinary messages and synchronous input requests keep their existing paths.Interactive controls are restricted to owned sessions with an answer route; isolated subagent messages retain their existing text path. The acknowledged continuation ID is recorded before answer delivery resolves, with live-session and host/native ownership checks, so Stop targets it before its notification arrives.
The controller deduplicates items, reopens questions on delivery failure, cancels stale controls on replacement/disposal, and handles Stop during an in-flight answer. It also handles an answer RPC response arriving before the native turn-start notification. No suggested answer is automatically submitted. Late answer acknowledgements are ignored after cancellation or question replacement.
Fixes #336509.
Validation: 21 passing tests in the focused source suite (20 behavior tests plus the harness check), zero targeted TypeScript diagnostics, targeted ESLint and whitespace checks. Nineteen bundle tests pass against inspected Windows ARM64 and Ubuntu ARM64 1.137.0 bundles, including an unpatched regression reproduction and extracted patched dispatcher/answer-routing execution. Staged apply, idempotence and exact rollback passed. Pre-publication self-review found and corrected Stop and RPC/event ordering races. No full build or live interactive UI validation is claimed.
Public source snapshot, backport and validation: PR #336512 documentation. The bundle backport is installed on the inspected Windows and Ubuntu 1.137.0 hosts; activation still requires restarting their VS Code host processes.
AI disclosure: this comment and the related code were written with the assistance of AI.