Skip to content

Sync updates to imported external agent sessions - #36356

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3d9e71cd66e8b31cf5128e8869063868bfb3eb05
Jul 31, 2026
Merged

Sync updates to imported external agent sessions#36356
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3d9e71cd66e8b31cf5128e8869063868bfb3eb05

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 31, 2026

Copy link
Copy Markdown

Sync updates to imported external agent sessions

Why

External agent session files can gain messages after their initial import. Re-importing those files should extend the existing Codex thread instead of creating a duplicate.

What changed

  • Map a changed source session back to its uniquely imported thread and append only the missing transcript suffix.
  • Update the import ledger after verifying that the source and destination transcripts match.
  • Defer the update when the target is active, archived, ambiguous, diverged, or otherwise unsafe to modify.

Testing

Added unit and app-server coverage for suffix planning, ledger checkpointing, concurrent updates, and unsafe targets that must be deferred.

## Why

External agent session files can gain messages after their initial import. Re-importing those files should extend the existing Codex thread instead of creating a duplicate.

## What changed

- Map a changed source session back to its uniquely imported thread and append only the missing transcript suffix.
- Update the import ledger after verifying that the source and destination transcripts match.
- Defer the update when the target is active, archived, ambiguous, diverged, or otherwise unsafe to modify.

## Testing

Added unit and app-server coverage for suffix planning, ledger checkpointing, concurrent updates, and unsafe targets that must be deferred.

GitOrigin-RevId: 3d9e71cd66e8b31cf5128e8869063868bfb3eb05
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3d9e71cd66e8b31cf5128e8869063868bfb3eb05 branch from e383d89 to bbbf396 Compare July 31, 2026 16:18
@copyberry
copyberry Bot merged commit bbbf396 into main Jul 31, 2026
27 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3d9e71cd66e8b31cf5128e8869063868bfb3eb05 branch July 31, 2026 16:20
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 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