Repository navigation
Description
Codex can consume and answer a steering message while the message remains under Steering in the Agent Host chat UI when attached context expands its input text.
Reproduction
- Start a Codex Agent Host task and let it continue working.
- Send a steering message with a text-bearing attachment, such as automatically attached browser context, a selected file, or an embedded text selection.
- Observe Codex respond to that message while its pending steering entry remains visible.
Expected: the consumed input echo promotes the original steering message and clears its pending entry before the response is attributed to it.
Actual: the adapter fails to correlate the consumed input with the pending message. The response continues in the existing turn and the pending entry remains until later cleanup.
Cause
In codexAgent.ts, setPendingMessages calls resolveCodexInput(text, attachments), which appends textual context, but stores the original PendingMessage. _takeMatchingPendingSteering compares the SDK's echoed input with msg.message.text using exact equality.
For example, the original message Review this page is sent and echoed as Review this page\n\nBrowser context. The two values cannot match. Matching should retain the exact resolved input sent to Codex while preserving the original message for display.
This path is present in the untouched VS Code 1.137.0 (645f29cc3176500b4b5762ba887cf2a7f0ffdf2c) bundle and upstream source. The live observation was on a locally patched installation; comparison with its untouched backup confirms that the matcher, input resolver, and steering buffering code were unchanged by those local patches. The raw-text matcher was introduced in upstream commit 5087b22.
Codex 0.149.1 emits both started and completed events for consumed user input. A successful turn/steer response only acknowledges submission, so clearing pending state on that response would be premature.
Related tracking epic: #333174.
Public source and backport
Source patch and validation · Installed-bundle fix. These immutable links describe this proposal; publication to the collection's main branch is under review in RyanEwen/vscode-patches#1.
Fix proposed in #335547.
AI disclosure: this comment and the related code were written with the assistance of AI.
Activity