Skip to content

fix(tui): preserve queued follow-ups after capacity errors - #1

Open
relh wants to merge 1 commit into
mainfrom
fix/preserve-queue-after-failed-turn
Open

fix(tui): preserve queued follow-ups after capacity errors#1
relh wants to merge 1 commit into
mainfrom
fix/preserve-queue-after-failed-turn

Conversation

@relh

@relh relh commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What

Keep Tab-queued follow-up inputs pending when an active TUI turn terminalizes with a structured ServerOverloaded error. Successful turn completion continues to advance the queue normally.

Candidate fix for openai#33853, held in the fork pending the maintainer invitation required by upstream's external-contribution policy.

Why

The overload handler currently finalizes the failed turn and immediately calls maybe_send_next_queued_input(). A dependent follow-up can therefore begin against partial side effects and incomplete conversation state from the failed prerequisite turn.

This is intentionally separate from same-turn capacity retry work such as openai#31058: even after a retry budget is exhausted, dependent queued work should not cascade automatically.

How

  • Stop draining queued input from the terminal server-overload handler.
  • Preserve the existing warning and turn-finalization behavior.
  • Extend app-server lifecycle coverage through both the non-retry overload error and the subsequent failed turn/completed notification.
  • Assert that no new Op::UserTurn is emitted and that the queued text remains available for review.

Validation

  • just test -p codex-tui live_app_server_server_overloaded_error_preserves_queued_follow_up
  • just test -p codex-tui (3,094 passed; 4 pre-existing skipped)
  • just fix -p codex-tui
  • just fmt

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.

1 participant