Skip to content

Preserve paginated history for spawned subagents - #33432

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e57dc37c29aa4aaaf57b052b991be591d730e5ba
Jul 15, 2026
Merged

Preserve paginated history for spawned subagents#33432
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e57dc37c29aa4aaaf57b052b991be591d730e5ba

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 15, 2026

Copy link
Copy Markdown

Preserve paginated history for spawned subagents

What changed

  • Inherit paginated history mode when spawning or forking a subagent from a paginated parent.
  • Load the parent's model context when forking and persist it as an inherited rollout prefix, while excluding that prefix from the child's projected turns, items, and metadata.
  • Record the boundary between inherited context and child history, and reject partially initialized paginated subagent rollouts on resume.
  • Resume paginated subagents from their stored model context instead of legacy rollout history.

Testing

Added coverage for fresh and forked paginated subagents, compacted-history forks, model-context resume, inherited-prefix projection, metadata isolation, and incomplete-prefix detection.

## What changed

- Inherit paginated history mode when spawning or forking a subagent from a paginated parent.
- Load the parent's model context when forking and persist it as an inherited rollout prefix, while excluding that prefix from the child's projected turns, items, and metadata.
- Record the boundary between inherited context and child history, and reject partially initialized paginated subagent rollouts on resume.
- Resume paginated subagents from their stored model context instead of legacy rollout history.

## Testing

Added coverage for fresh and forked paginated subagents, compacted-history forks, model-context resume, inherited-prefix projection, metadata isolation, and incomplete-prefix detection.

GitOrigin-RevId: e57dc37c29aa4aaaf57b052b991be591d730e5ba
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e57dc37c29aa4aaaf57b052b991be591d730e5ba branch 2 times, most recently from 9ebfc6b to 2be648b Compare July 15, 2026 21:25
@copyberry
copyberry Bot merged commit 2be648b into main Jul 15, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e57dc37c29aa4aaaf57b052b991be591d730e5ba branch July 15, 2026 21:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 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.

2 participants