Skip to content

Preserve delegated tasks across remote compaction - #36128

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

Preserve delegated tasks across remote compaction#36128
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ba4392e9cfdf4ecbcdc9c7d8581d58a8d2d78260

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 30, 2026

Copy link
Copy Markdown

Preserve delegated tasks across remote compaction

What changed

  • Retain bounded, non-completion agent messages in remote v2 compaction history so delegated tasks remain available on follow-up turns.
  • Account for encrypted agent-message content when estimating token usage and place restored initial context before the latest real user or agent message.
  • Exclude child completion messages from retained follow-up history and strip inherited parent agent messages when forking a child.

Testing

  • Extend compaction, history-estimation, and agent-fork tests to cover encrypted delegated tasks, child completions, context ordering, and fork sanitization.

## What changed

- Retain bounded, non-completion agent messages in remote v2 compaction history so delegated tasks remain available on follow-up turns.
- Account for encrypted agent-message content when estimating token usage and place restored initial context before the latest real user or agent message.
- Exclude child completion messages from retained follow-up history and strip inherited parent agent messages when forking a child.

## Testing

- Extend compaction, history-estimation, and agent-fork tests to cover encrypted delegated tasks, child completions, context ordering, and fork sanitization.

GitOrigin-RevId: ba4392e9cfdf4ecbcdc9c7d8581d58a8d2d78260
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ba4392e9cfdf4ecbcdc9c7d8581d58a8d2d78260 branch from 2ae6269 to 4f6d06d Compare July 30, 2026 10:12
@copyberry
copyberry Bot merged commit 4f6d06d into main Jul 30, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ba4392e9cfdf4ecbcdc9c7d8581d58a8d2d78260 branch July 30, 2026 10:13
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 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