Skip to content

Allow root turn suspension with live descendants - #54414

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5adc240ae6e34654209154ee9324621a2bd604d5
Oct 15, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Allow root turn suspension with live descendants

Why

Live descendants previously blocked suspension of an unfinished root turn, requiring callers to stop and unload them before recovering the root elsewhere.

What changed

Allow suspend_turn_and_shutdown to suspend the root and initiate shutdown of all sessions sharing its local agent runtime, fencing new starts. Remove SuspendTurnOutcome::HasLiveDescendants.

Success confirms that the root has stopped and its history writer is flushed and closed; descendant cleanup completes separately. Callers must finish tree shutdown or fence and terminate the tree's persistence writers before transferring ownership. Interrupted descendants are not automatically recovered.

Testing

Extend integration coverage to verify child shutdown, recovery under the original root turn ID without restarting children, and separate reporting of child writer failures.

## Why

Live descendants previously blocked suspension of an unfinished root turn, requiring callers to stop and unload them before recovering the root elsewhere.

## What changed

Allow `suspend_turn_and_shutdown` to suspend the root and initiate shutdown of all sessions sharing its local agent runtime, fencing new starts. Remove `SuspendTurnOutcome::HasLiveDescendants`.

Success confirms that the root has stopped and its history writer is flushed and closed; descendant cleanup completes separately. Callers must finish tree shutdown or fence and terminate the tree's persistence writers before transferring ownership. Interrupted descendants are not automatically recovered.

## Testing

Extend integration coverage to verify child shutdown, recovery under the original root turn ID without restarting children, and separate reporting of child writer failures.

GitOrigin-RevId: 5adc240ae6e34654209154ee9324621a2bd604d5
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/5adc240ae6e34654209154ee9324621a2bd604d5 branch from f6c7104 to 341de32 Compare October 15, 2026 20:57
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-15T20:57:53.194039Z f6c7104 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 341de32 into main Oct 15, 2026
6 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/5adc240ae6e34654209154ee9324621a2bd604d5 branch October 15, 2026 20:58
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 341de32c Deployed Oct 15, 2026 by alaemiryoung via Generate label suggestions #55895
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