Skip to content

Bug: transient red turn failures should not advance queued messages #30

@ARCJ137442

Description

@ARCJ137442

Problem

When Codex ends a turn with a red, non-normal, transient failure message, queue execution semantics break.

Examples include, but are not limited to:

  • ■ exceeded retry limit, last status: 429 Too Many Requests
  • other transient backend / transport / overload failures that surface as red interruption-style turn endings

Current behavior

  • the failed turn is treated like a successfully completed turn
  • the next queued unsent message is sent immediately
  • the failed current message is not preserved as the active retry unit
  • multi-step queued workflows become misordered

Expected behavior

  • any transient failure that is rendered as a red, non-normal turn-ending message should not advance the queue as if the previous message completed successfully
  • the previously sent current message should remain the active/current message for retry semantics
  • queued unsent messages must remain queued and unconsumed
  • the next queued message should run only after the previous message truly completes

Goal

Guarantee queue ordering under transient failure conditions so that queued workflows remain sequential and deterministic.

Example

  1. send message A
  2. A ends with a transient red failure
  3. queue still contains message B, C
  4. system should retry A or preserve A as the current pending retry unit
  5. B must not be sent yet

Scope notes

This issue is intentionally broader than only 429.

Target class:

  • transient, retryable, red turn-ending failures

Out of scope:

  • normal turn completion
  • user-intentional interruption semantics such as explicit cancel/replace flows, unless later found to share the same broken queue-advance path
  • permanent hard failures that should not be retried automatically

Acceptance criteria

  • a transient red failure does not dequeue or advance later queued messages
  • the failed current message is preserved for retry semantics
  • queue order after recovery remains A -> B -> C
  • add regression coverage for representative transient failure paths

Out of scope for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions