Skip to content

Agent Host: Codex steering with attached context stays pending after consumption #335546

Closed

Description

@RyanEwen

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

  1. Start a Codex Agent Host task and let it continue working.
  2. Send a steering message with a text-bearing attachment, such as automatically attached browser context, a selected file, or an embedded text selection.
  3. 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

  1. added
    bug
    on Sep 14, 2026
  2. added
    unreleased
    on Sep 22, 2026
  3. added this to the 1.140.0 milestone on Sep 22, 2026
  4. added
    insiders-released
    and removed
    unreleased
    on Sep 23, 2026
  5. added
    verified
    on Sep 28, 2026
  6. locked and limited conversation to collaborators on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions