Skip to content

Preserve base and developer instructions in host child preparation - #62128

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/0e151e343e58d995c8901a9ba819cb7f60d248f5
Nov 17, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Preserve base and developer instructions in host child preparation

Why

Hosts preparing a child thread lacked the parent's effective base
instructions and the developer instructions a native subagent would inherit.
Hosts also need the base instruction provenance to preserve custom text
while letting model-owned instructions resolve for the child's model.

What changed

Include effective base instruction text and provenance in
PreparedChildContext. Share developer instruction selection with native
subagent creation so host preparation uses the configured V2 subagent
override when present and falls back to the parent turn's developer
instructions otherwise.

Testing

Add integration coverage that starts a child on a different model and
checks that custom base instructions persist, model-owned instructions
resolve for the child model, and the V2 override takes precedence over
the parent developer instructions.

…62128)

## Why

Hosts preparing a child thread lacked the parent's effective base
instructions and the developer instructions a native subagent would inherit.
Hosts also need the base instruction provenance to preserve custom text
while letting model-owned instructions resolve for the child's model.

## What changed

Include effective base instruction text and provenance in
`PreparedChildContext`. Share developer instruction selection with native
subagent creation so host preparation uses the configured V2 subagent
override when present and falls back to the parent turn's developer
instructions otherwise.

## Testing

Add integration coverage that starts a child on a different model and
checks that custom base instructions persist, model-owned instructions
resolve for the child model, and the V2 override takes precedence over
the parent developer instructions.

GitOrigin-RevId: 0e151e343e58d995c8901a9ba819cb7f60d248f5
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/0e151e343e58d995c8901a9ba819cb7f60d248f5 branch from f06ca7f to e73da8b Compare November 17, 2026 23:32
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-17T23:32:23.840270Z f06ca7f 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 e73da8b into main Nov 17, 2026
10 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/0e151e343e58d995c8901a9ba819cb7f60d248f5 branch November 17, 2026 23:32
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026
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.

1 participant