Skip to content

Interrupt active code-mode cells with their turn - #37483

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2b8634776a89b636318a39b9e9ad2eefc07cead8
Aug 7, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Interrupt active code-mode cells with their turn

Why

Interrupting a turn should also stop code-mode work that the turn left running.

What changed

  • Add the disabled-by-default code_mode_interrupt feature.
  • When an interrupted turn has the feature enabled, terminate all active code-mode cells and propagate cancellation through nested tool calls.
  • Keep the reusable code-mode session alive so its stored state remains available to later turns.

Testing

Add an integration test that interrupts a long-running nested tool, verifies that active and background cells are removed, and confirms that session state is preserved.

## Why

Interrupting a turn should also stop code-mode work that the turn left running.

## What changed

- Add the disabled-by-default `code_mode_interrupt` feature.
- When an interrupted turn has the feature enabled, terminate all active code-mode cells and propagate cancellation through nested tool calls.
- Keep the reusable code-mode session alive so its stored state remains available to later turns.

## Testing

Add an integration test that interrupts a long-running nested tool, verifies that active and background cells are removed, and confirms that session state is preserved.

GitOrigin-RevId: 2b8634776a89b636318a39b9e9ad2eefc07cead8
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2b8634776a89b636318a39b9e9ad2eefc07cead8 branch from a6fcfa1 to 5095658 Compare August 7, 2026 18:22
@copyberry
copyberry Bot merged commit 5095658 into main Aug 7, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2b8634776a89b636318a39b9e9ad2eefc07cead8 branch August 7, 2026 18:23
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 50956582 Deployed Aug 7, 2026 by wreynolds79 via Translate non-English issue #7180
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.

2 participants