Skip to content

Preserve subagent capabilities independently of forked history - #52241

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2a6891a9bc6372fd2d1f30add2b5611f96b60594
Oct 8, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Preserve subagent capabilities independently of forked history

Why

Subagents should retain the spawning turn's selected skills and plugin choices whether fork_turns is none or all. Capability selection should not depend on copied conversation metadata.

What changed

  • Use a shared child startup path for fresh and history-forked agents, inheriting selected capability roots from the spawning environment snapshot.
  • Pass the spawning turn's disabled_plugin_ids through both spawn handlers. When omitted, inherit the parent's current choices; explicit lists, including an empty list, override them.
  • Resolve the parent before startup so inherited client MCP settings apply even when only the session source identifies the parent.
  • Carry plugin choices into delegates with inherited isolation and preserve saved capability roots when resuming a child.

Testing

Add regression coverage for executor skill listing and reading, plugin MCP registration with both history modes, plugin overrides, capability-root precedence and isolation, and restoring saved child settings after parent settings change.

## Why

Subagents should retain the spawning turn's selected skills and plugin choices whether `fork_turns` is `none` or `all`. Capability selection should not depend on copied conversation metadata.

## What changed

- Use a shared child startup path for fresh and history-forked agents, inheriting selected capability roots from the spawning environment snapshot.
- Pass the spawning turn's `disabled_plugin_ids` through both spawn handlers. When omitted, inherit the parent's current choices; explicit lists, including an empty list, override them.
- Resolve the parent before startup so inherited client MCP settings apply even when only the session source identifies the parent.
- Carry plugin choices into delegates with inherited isolation and preserve saved capability roots when resuming a child.

## Testing

Add regression coverage for executor skill listing and reading, plugin MCP registration with both history modes, plugin overrides, capability-root precedence and isolation, and restoring saved child settings after parent settings change.

GitOrigin-RevId: 2a6891a9bc6372fd2d1f30add2b5611f96b60594
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2a6891a9bc6372fd2d1f30add2b5611f96b60594 branch from 2e25b08 to 845345b Compare October 8, 2026 19:22
@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-08T19:22:09.776072Z 2e25b08 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 845345b into main Oct 8, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2a6891a9bc6372fd2d1f30add2b5611f96b60594 branch October 8, 2026 19:22
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 2026
@Timofa
Timofa deployed to issue-triage October 8, 2026 19:23 — with Image GitHub Actions Active
@Timofa
Timofa deployed to issue-triage October 8, 2026 19:23 — with Image GitHub Actions Active
@Timofa
Timofa deployed to issue-triage October 8, 2026 19:23 — with Image GitHub Actions Active
@Timofa
Timofa deployed to issue-triage October 8, 2026 19:24 — with Image GitHub Actions Active
@bozensel
bozensel deployed to issue-triage October 8, 2026 19:26 — with Image GitHub Actions Active
@bozensel
bozensel deployed to issue-triage October 8, 2026 19:26 — with Image GitHub Actions Active
@bozensel
bozensel deployed to issue-triage October 8, 2026 19:26 — with Image GitHub Actions Active
@natx808
natx808 deployed to issue-triage October 8, 2026 19:29 — with Image GitHub Actions Active
@natx808
natx808 deployed to issue-triage October 8, 2026 19:29 — with Image GitHub Actions Active
@natx808
natx808 deployed to issue-triage October 8, 2026 19:29 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 845345b1 Deployed Oct 8, 2026 by natx808 via Generate label suggestions #53293
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.

4 participants