Skip to content

Add opt-in code-mode yielding on new user input - #48135

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e33466a980d98e113bfb6c6a45c59de0cc7b3c1d
Sep 25, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e33466a980d98e113bfb6c6a45c59de0cc7b3c1d

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Add opt-in code-mode yielding on new user input

Why

User input queued during a long-running code-mode exec or wait can remain pending until the call returns. Allow these calls to yield early so Codex can receive the new input while the cell continues running.

What changed

  • Add the instant_interrupt feature flag, disabled by default.
  • Watch queued user input for each sampling request and pass a shared preemption signal to code-mode exec and wait calls, including calls received later in the same response.
  • Yield running cell IDs without stopping the cells, allowing subsequent wait calls to collect their results.

Testing

Add integration coverage for enabled and disabled behavior, repeated steering during exec and wait, input deferred during compaction, and later calls in the same response. Verify that direct tool results and queued user messages are preserved, and add a scenario snapshot showing continuation after a cell yields.

## Why

User input queued during a long-running code-mode `exec` or `wait` can remain pending until the call returns. Allow these calls to yield early so Codex can receive the new input while the cell continues running.

## What changed

- Add the `instant_interrupt` feature flag, disabled by default.
- Watch queued user input for each sampling request and pass a shared preemption signal to code-mode `exec` and `wait` calls, including calls received later in the same response.
- Yield running cell IDs without stopping the cells, allowing subsequent `wait` calls to collect their results.

## Testing

Add integration coverage for enabled and disabled behavior, repeated steering during `exec` and `wait`, input deferred during compaction, and later calls in the same response. Verify that direct tool results and queued user messages are preserved, and add a scenario snapshot showing continuation after a cell yields.

GitOrigin-RevId: e33466a980d98e113bfb6c6a45c59de0cc7b3c1d
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e33466a980d98e113bfb6c6a45c59de0cc7b3c1d branch from df35e7e to 1bf7332 Compare September 25, 2026 16:28
@copyberry
copyberry Bot merged commit 1bf7332 into main Sep 25, 2026
13 of 18 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e33466a980d98e113bfb6c6a45c59de0cc7b3c1d branch September 25, 2026 16:28
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026
@ylnlg666
ylnlg666 deployed to issue-triage September 25, 2026 16:44 — with GitHub Actions Active
@ylnlg666
ylnlg666 deployed to issue-triage September 25, 2026 16:44 — with GitHub Actions Active
@ylnlg666
ylnlg666 deployed to issue-triage September 25, 2026 16:44 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants