Repository navigation
Preserve pending environments when spawning subagents - #49075
Merged
copyberry[bot] merged 1 commit intoSep 28, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Spawning a subagent before an environment was ready dropped the starting environment from the child's selections. The child needs to retain that environment and receive its configuration or failure when preparation finishes. ## What changed - Pass the spawning step's environment snapshot to children, preserving ready and starting environments and configuration ownership. - Propagate the original owner's first configuration result through descendants, applying each session's validation and leaving independently configured children unchanged. - Preserve pending configuration waits across executor retries. Later owner updates do not overwrite the child's inherited configuration. ## Testing Add regression coverage for fresh and forked subagents, readiness through turn-settings updates, failure propagation to children and grandchildren, child configuration precedence, and executor retries. Add a request snapshot showing a child using `wait_for_environment` before execution tools become available. GitOrigin-RevId: a2afed740391f88d195596cfe28e418332b60d43
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/a2afed740391f88d195596cfe28e418332b60d43
branch
from
September 28, 2026 20:42
e9debb2 to
3749d1e
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/a2afed740391f88d195596cfe28e418332b60d43
branch
September 28, 2026 20:42
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.
Preserve pending environments when spawning subagents
Why
Spawning a subagent before an environment was ready dropped the starting environment from the child's selections. The child needs to retain that environment and receive its configuration or failure when preparation finishes.
What changed
Testing
Add regression coverage for fresh and forked subagents, readiness through turn-settings updates, failure propagation to children and grandchildren, child configuration precedence, and executor retries. Add a request snapshot showing a child using
wait_for_environmentbefore execution tools become available.