Skip to content

Record interrupted turns in managed daemon recovery snapshots - #45807

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Record interrupted turns in managed daemon recovery snapshots

Why

Managed daemon recovery snapshots previously saved only loaded thread IDs, without identifying active turns or preserving their turn-specific options.

What changed

  • Capture regular, uncanceled turns after their input is recorded, saving the turn ID, output schema, service tier, and cyber access program alongside persisted thread IDs.
  • Store interruption metadata atomically in the existing candidate array format so older servers can still read thread candidates.
  • Begin snapshotting once admitted operations drain, while turns may still be running. Run snapshot collection and thread listener attachment independently of the event loop to keep forced shutdown responsive.

Testing

Add coverage for running, completed, canceled, and compacting turns; recovery readiness for automatic and user turns; admitted resumes during shutdown; forced shutdown with a blocked rollout writer and child listener attachment; and legacy candidate-array compatibility.

## Why

Managed daemon recovery snapshots previously saved only loaded thread IDs, without identifying active turns or preserving their turn-specific options.

## What changed

- Capture regular, uncanceled turns after their input is recorded, saving the turn ID, output schema, service tier, and cyber access program alongside persisted thread IDs.
- Store interruption metadata atomically in the existing candidate array format so older servers can still read thread candidates.
- Begin snapshotting once admitted operations drain, while turns may still be running. Run snapshot collection and thread listener attachment independently of the event loop to keep forced shutdown responsive.

## Testing

Add coverage for running, completed, canceled, and compacting turns; recovery readiness for automatic and user turns; admitted resumes during shutdown; forced shutdown with a blocked rollout writer and child listener attachment; and legacy candidate-array compatibility.

GitOrigin-RevId: ed46342c3a5c71b09c48fa9acece2f15ae748e2f
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ed46342c3a5c71b09c48fa9acece2f15ae748e2f branch from 72bfb86 to 4d28070 Compare September 15, 2026 23:31
@copyberry
copyberry Bot merged commit 4d28070 into main Sep 15, 2026
14 of 18 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ed46342c3a5c71b09c48fa9acece2f15ae748e2f branch September 15, 2026 23:31
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2026

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.

2 participants