Skip to content

Accepted steers can disappear during interruption before persistence #45967

Open

Description

@diegomrsantos

Follow up to #45497.

Core tests reproduce an accepted steer disappearing from the rollout after interruption. They do not establish that this was the cause of the original desktop incident.

TurnInputSubmission::Steered acknowledges acceptance for processing, not completion of prompt hooks or persistence. There are two distinct cancellation windows:

  • A steer still in the pending queue is cleared during abort cleanup.
  • A steer already removed from the queue can be lost if cancellation stops its prompt hook before history recording. A test that waits for that hook to start, interrupts, and parses the saved user response items finds zero copies of the acknowledged steer. This occurs both before and with the proposed patch.

The proposal in diegomrsantos/codex#3 is not a verified fix. Review reproduced two regressions:

  • It starts UserPromptSubmit hooks during abort and waits for them before TurnAborted. A gated hook holds interruption open until released. The same responsiveness test passes before the patch. Prompt hooks default to a 600 second timeout, unlike the short timeout for interrupt hooks.
  • It emits completed user message events before TurnAborted. In the TUI, those events remove pending steers, so pressing Esc to submit them no longer starts the replacement turn. The existing TUI control test passes; delivering the new event sequence makes its submission assertion fail.

Preserving input must distinguish an unprocessed message from one accepted by hooks and committed to model history. Recording raw input directly would bypass hook rejection on resume; recovering it without stable retry identity can duplicate messages that clients resubmit. The existing queue for future turns deletes entries when a turn starts, so it does not supply that missing recovery contract.

The earlier assertions that the desktop cause was confirmed and that PR #3 fixed the loss have been withdrawn. The PR is a draft pending a safe recovery design and corresponding integration tests.

Activity

  1. added
    bug
    app
    app-server
    on Sep 16, 2026
  2. github-actions commented on Sep 16, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. diegomrsantos commented on Sep 16, 2026

    @diegomrsantos
    Author

    @bryanashley Could you advise on the intended recovery contract for accepted but unprocessed steers, given the related persistence work in #45506?

    The proposal in diegomrsantos/codex#3 is now a draft. Review reproduced a new delay from prompt hooks during interruption and a TUI Esc regression. It also showed that input already removed from the pending queue can still disappear during cancellation. The issue body describes the tests and their limits.

    The earlier claim that this was a verified fix for the desktop incident was incorrect. A safe replacement needs to preserve pending input separately from committed history and handle client resubmission without duplication.

  4. changed the title [-][macOS Desktop] Persist accepted steers when an active turn is interrupted[/-] [+]Accepted steers can disappear during interruption before persistence[/+] on Sep 16, 2026
  5. iamhectorlopez commented on Nov 26, 2026

    @iamhectorlopez

    I observed this again on November 25, 2026 on macOS Desktop 26.1120.50957 (build 30866), macOS 27.2.1 on Apple Silicon.

    • During an active turn making tool calls, the backend logged receipt of the input and the Desktop log recorded a successful turn/steer response (errorCode=null).
    • The active turn was interrupted 18.2 seconds later. A replacement turn started 1.7 seconds after the interruption and finished the original task.
    • The saved rollout and Desktop history readback contain the original user prompt, the interruption, and the replacement turn. Neither turn contains a user-message record for the steer. The follow-up remained unhandled, and there was no queued message for this chat when I checked afterward.

    This adds a Desktop observation on a newer build. The evidence shows where the steer was acknowledged and that it was absent from saved history. The exact point where it was lost remains unknown. Acknowledged input should stay recoverable after interruption, with a visible delivery or retry state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions