Skip to content

Add opt-in history prefix preservation for full agent forks - #52535

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ce9235dfa111c88d6ce66cb93d564fb63b326489
Oct 9, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Add opt-in history prefix preservation for full agent forks

What changed

Add preserve_fork_prefix to the multi-agent v2 configuration, defaulting to false. When enabled, full forks retain the parent's model-visible history, including commentary and tool records, and append the child's instructions. Legacy compaction without a reusable context baseline still rebuilds the child context.

Mark copied history as inherited, complete unfinished tool calls in the fork snapshot, and exclude inherited manual approvals from authorization review while retaining them in model context.

Testing

Add coverage for preserved request prefixes, child instructions, legacy and paginated histories, Code Mode, missing inherited tool outputs, compaction fallback, and approval isolation across checkpoint replay. Update the noisy helper failure test to read its response before starting cleanup.

## What changed

Add `preserve_fork_prefix` to the multi-agent v2 configuration, defaulting to `false`. When enabled, full forks retain the parent's model-visible history, including commentary and tool records, and append the child's instructions. Legacy compaction without a reusable context baseline still rebuilds the child context.

Mark copied history as inherited, complete unfinished tool calls in the fork snapshot, and exclude inherited manual approvals from authorization review while retaining them in model context.

## Testing

Add coverage for preserved request prefixes, child instructions, legacy and paginated histories, Code Mode, missing inherited tool outputs, compaction fallback, and approval isolation across checkpoint replay. Update the noisy helper failure test to read its response before starting cleanup.

GitOrigin-RevId: ce9235dfa111c88d6ce66cb93d564fb63b326489
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ce9235dfa111c88d6ce66cb93d564fb63b326489 branch from c1dc53a to a06545b Compare October 9, 2026 11:08
@copyberry
copyberry Bot merged commit a06545b into main Oct 9, 2026
8 of 11 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ce9235dfa111c88d6ce66cb93d564fb63b326489 branch October 9, 2026 11:08
@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-09T11:08:38.072714Z c1dc53a 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.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
@EvilWiggins
EvilWiggins deployed to issue-triage October 9, 2026 11:09 — with Image GitHub Actions Active
@EvilWiggins
EvilWiggins deployed to issue-triage October 9, 2026 11:09 — with Image GitHub Actions Active
@EvilWiggins
EvilWiggins deployed to issue-triage October 9, 2026 11:09 — with Image GitHub Actions Active
@adsoto20
adsoto20 deployed to issue-triage October 9, 2026 11:12 — with Image GitHub Actions Active
@adsoto20
adsoto20 deployed to issue-triage October 9, 2026 11:12 — with Image GitHub Actions Active
@adsoto20
adsoto20 deployed to issue-triage October 9, 2026 11:12 — with Image GitHub Actions Active
@louzhuzz
louzhuzz deployed to issue-triage October 9, 2026 11:31 — with Image GitHub Actions Active
@louzhuzz
louzhuzz deployed to issue-triage October 9, 2026 11:31 — with Image GitHub Actions Active
@louzhuzz
louzhuzz deployed to issue-triage October 9, 2026 11:31 — with Image GitHub Actions Active
@aimtar
aimtar deployed to issue-triage October 9, 2026 11:37 — with Image GitHub Actions Active
@aimtar
aimtar deployed to issue-triage October 9, 2026 11:37 — with Image GitHub Actions Active
@aimtar
aimtar deployed to issue-triage October 9, 2026 11:37 — with Image GitHub Actions Active
@ZzuMrW
ZzuMrW deployed to issue-triage October 9, 2026 11:45 — with Image GitHub Actions Active
@ZzuMrW
ZzuMrW deployed to issue-triage October 9, 2026 11:45 — with Image GitHub Actions Active
@ZzuMrW
ZzuMrW deployed to issue-triage October 9, 2026 11:45 — with Image GitHub Actions Active
@yarbabkin
yarbabkin deployed to issue-triage October 9, 2026 12:00 — with Image GitHub Actions Active
@yarbabkin
yarbabkin deployed to issue-triage October 9, 2026 12:00 — with Image GitHub Actions Active
@yarbabkin
yarbabkin deployed to issue-triage October 9, 2026 12:00 — with Image GitHub Actions Active
@alexmmitro
alexmmitro deployed to issue-triage October 9, 2026 12:01 — with Image GitHub Actions Active
@alexmmitro
alexmmitro deployed to issue-triage October 9, 2026 12:01 — with Image GitHub Actions Active
@alexmmitro
alexmmitro deployed to issue-triage October 9, 2026 12:01 — with Image GitHub Actions Active
@alexmmitro
alexmmitro deployed to issue-triage October 9, 2026 12:07 — with Image GitHub Actions Active
@wanghaodawn
wanghaodawn deployed to issue-triage October 9, 2026 12:07 — with Image GitHub Actions Active
@wanghaodawn
wanghaodawn deployed to issue-triage October 9, 2026 12:07 — with Image GitHub Actions Active
@wanghaodawn
wanghaodawn deployed to issue-triage October 9, 2026 12:07 — with Image GitHub Actions Active
@wanghaodawn
wanghaodawn deployed to issue-triage October 9, 2026 12:11 — with Image GitHub Actions Active
@PaulRBerg
PaulRBerg deployed to issue-triage October 9, 2026 12:13 — with Image GitHub Actions Active
@PaulRBerg
PaulRBerg deployed to issue-triage October 9, 2026 12:13 — with Image GitHub Actions Active
@PaulRBerg
PaulRBerg deployed to issue-triage October 9, 2026 12:13 — with Image GitHub Actions Active
@ElierHG
ElierHG deployed to issue-triage October 9, 2026 12:14 — with Image GitHub Actions Active
@ElierHG
ElierHG deployed to issue-triage October 9, 2026 12:14 — with Image GitHub Actions Active
@ElierHG
ElierHG deployed to issue-triage October 9, 2026 12:14 — with Image GitHub Actions Active
@PaulRBerg
PaulRBerg deployed to issue-triage October 9, 2026 12:15 — with Image GitHub Actions Active
@adrianonna
adrianonna deployed to issue-triage October 9, 2026 12:15 — with Image GitHub Actions Active
@adrianonna
adrianonna deployed to issue-triage October 9, 2026 12:15 — with Image GitHub Actions Active
@adrianonna
adrianonna deployed to issue-triage October 9, 2026 12:15 — with Image GitHub Actions Active
@ElierHG
ElierHG deployed to issue-triage October 9, 2026 12:15 — with Image GitHub Actions Active
@adrianonna
adrianonna deployed to issue-triage October 9, 2026 12:16 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.