Repository navigation
Overlap subagent spawn persistence and clean up cancelled children - #47348
Merged
copyberry[bot] merged 1 commit intoSep 22, 2026
Conversation
…47348) ## Why Forked subagent startup serializes history persistence and spawn-edge writes. Cancellation during startup can also leave a provisional child behind. ## What changed - Defer copied-history durability so it can run alongside spawn-edge persistence, while still awaiting both before submitting the child's initial input. - Commit agent and residency reservations and notify clients only after initial input is accepted. - Guard provisional children so cancellation or startup failure removes and shuts them down, discards their stored state, and closes their spawn edge after any pending edge write finishes. ## Testing Add coverage for cancellation at the child-history durability barrier, checking child termination, removal, and edge closure. Extend fork-context tests in legacy and paginated history modes to verify inherited context can be read from storage after spawn acknowledgment without flushing the live child first. GitOrigin-RevId: e02dda57efc32b7237bb7af0ce5e5844922890c3
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/e02dda57efc32b7237bb7af0ce5e5844922890c3
branch
from
September 22, 2026 19:39
b014a11 to
5121aef
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/e02dda57efc32b7237bb7af0ce5e5844922890c3
branch
September 22, 2026 19:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overlap subagent spawn persistence and clean up cancelled children
Why
Forked subagent startup serializes history persistence and spawn-edge writes. Cancellation during startup can also leave a provisional child behind.
What changed
Testing
Add coverage for cancellation at the child-history durability barrier, checking child termination, removal, and edge closure. Extend fork-context tests in legacy and paginated history modes to verify inherited context can be read from storage after spawn acknowledgment without flushing the live child first.