Skip to content

feat(codex): investigate opt-in live steering with instant_interrupt #247

Open

Description

@abruption

Motivation

Investigate explicit opt-in steering of an already-running Codex turn using its native instant_interrupt capability, without changing default session-peer queued delivery.

The feature was introduced in Codex 0.159.0 and remains under development/default-off in installed 0.159.2. It preempts model responses and yields foreground code-mode observation waits when new current-turn user input arrives. It is not turn/interrupt, a process kill, rollback, or generic task-completion/ACK facility.

Current session-peer invokes codex queue. Codex's queued-item service dispatches only when idle; enabling this feature alone does not convert ordinary sends into steering.

Evidence: official changelog, App Server steering, session-peer session_peer_core/codex.py, and Codex upstream tag rust-v0.159.2 (ff6aec96948b70d94983af2641a6b67c94faeff5). Related live-server discovery experiment: #245 / Draft #246. This proposal does not replace those side-session lifetime requirements.

Alternatives considered

  • Enable a feature flag only on a sending codex queue process: does not steer an active destination.
  • Cancel the current turn with turn/interrupt and send a new message: changes cancellation semantics and introduces a two-operation failure window.
  • Use native turn/steer with an exact nonempty expectedTurnId: preferred candidate for explicitly authorized current-turn input.
  • Inject keystrokes, kill an existing writer, alter queue/state DB files, auto-resume, or retry ambiguous outcomes: excluded.

Proposed behaviour

  • Retain queue-only default. Evaluate a distinct explicit steering mode (CLI spelling is not finalized).
  • Connect to the existing owning app-server selected by the operator; no replacement server, parent fallback, or endpoint supplied by an untrusted peer message.
  • Exact home/server/thread/active-turn validation; native expectedTurnId handles turn replacement races.
  • Target owner selects instant_interrupt. Do not modify global configuration or active-session permissions. Disabled or unverified instantaneous preemption must not be advertised as enabled.
  • New steering permission/capability is separate from ordinary send/wake, including any future MCP/paired integration.
  • Acceptance is not consumption or ACK; bounded results distinguish refused, accepted, and unknown. No automatic queue fallback/resend.
  • Document that foreground yielding can leave code cells, commands or external work running, and cannot undo prior side effects.

Acceptance criteria

  • Add isolated experiment code and source-grounded design notes without modifying canonical runtime.
  • Run actual pinned native Codex against an isolated loopback streaming model-API fixture: queue vs steer × feature OFF/ON. Record whether the corrected request occurs before releasing the original response; label synthetic model content clearly.
  • Confirm queue remains next-turn in both flag states, and native steer targets the original active turn without creating a separate user turn.
  • Cover missing/closed/idle targets, wrong expected turn, unavailable server, disabled/unknown feature evidence, and malformed/disconnected/timeout outcomes.
  • Verify exact one-shot submission, no permission overrides, no auto-approval, no fallback/retry, and bounded cleanup of owned processes.
  • Record provider/model, Codex version, platform, sample count/timing tolerance, and untested real-model/SSH/Windows boundaries.
  • Prepare a Draft PR with findings and unmet general-use gates; do not claim a stable new delivery mode or close this issue prematurely.

Milestone: v1.1.0 (new opt-in functionality, not v1.0.3 security scope). User authorized technical review, issue registration, isolated tests and Draft PR creation; no merge, publication, existing-session interruption or production change is authorized.

Activity

  1. added this to the v1.1.0 milestone on Oct 1, 2026
  2. modified the milestones: v1.1.0, v1.2.0 on Oct 6, 2026
  3. added
    priority:P2Planned reliability, acceptance or feature work; priority does not authorize implementation.
    on Oct 13, 2026
  4. modified the milestones: v1.2.0, v1.3.0 on Oct 13, 2026
  5. modified the milestones: v1.3.0, Long-term on Oct 23, 2026
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

    enhancementNew feature or requestpriority:P2Planned reliability, acceptance or feature work; priority does not authorize implementation.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions