Skip to content

fix: turn-timeout gaps — no interrupt on deadline, stalled turn/start uncovered, background ignores --turn-timeout-ms #27

Closed

Description

@axisrow

From Codex cycle-review of PR #26 (turn-level timeout port from openai#376). Three gaps in the current timeout implementation:

1. Timed-out turn not interrupted

When the deadline wins Promise.race, the await rejects but turn/interrupt is NOT sent. The broker keeps executing the write-capable turn after it's reported failed. Fix: send turn/interrupt on deadline, await bounded ack.

2. Deadline armed after turn/start response

captureTurn awaits startRequest before arming the deadline. A stalled turn/start (app-server alive but not responding) remains unbounded. Fix: arm the deadline before startRequest, race the entire lifecycle.

3. --turn-timeout-ms ignored for background

The flag is parsed but consumed only by the foreground-only applyForegroundTurnBudget. Background runs fall back to the 600s default, ignoring explicit user override. Fix: persist the explicit value in detached task requests, forward through to captureTurn.

Refs #26, openai#376.

Activity

  1. changed the title [-]fix: timed-out turn not interrupted — broker keeps executing after deadline[/-] [+]fix: turn-timeout gaps — no interrupt on deadline, stalled turn/start uncovered, background ignores --turn-timeout-ms[/+] on Jul 20, 2026
  2. added a commit that references this issue on Jul 20, 2026
    bec139c
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions