Skip to content

Preserve timestamps when importing external agent sessions - #34989

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/396d5b7e7463a305a5a828ba3a432b4a97e5d2b9
Jul 23, 2026
Merged

Preserve timestamps when importing external agent sessions#34989
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/396d5b7e7463a305a5a828ba3a432b4a97e5d2b9

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 23, 2026

Copy link
Copy Markdown

Preserve timestamps when importing external agent sessions

Why

Imported sessions previously used the import time for their thread metadata,
discarding the chronology recorded by the source session.

What changed

  • Set created_at and updated_at from the earliest turn start and latest turn
    completion timestamps in the imported rollout.
  • Use the latest source timestamp for thread recency, while retaining the current
    time as a fallback when the rollout has no valid turn timestamps.

Testing

  • Update the external agent import integration test to verify the persisted
    creation, update, and recency timestamps.

## Why

Imported sessions previously used the import time for their thread metadata,
discarding the chronology recorded by the source session.

## What changed

- Set `created_at` and `updated_at` from the earliest turn start and latest turn
  completion timestamps in the imported rollout.
- Use the latest source timestamp for thread recency, while retaining the current
  time as a fallback when the rollout has no valid turn timestamps.

## Testing

- Update the external agent import integration test to verify the persisted
  creation, update, and recency timestamps.

GitOrigin-RevId: 396d5b7e7463a305a5a828ba3a432b4a97e5d2b9
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/396d5b7e7463a305a5a828ba3a432b4a97e5d2b9 branch from 562f2e8 to 0d49103 Compare July 23, 2026 18:36
@copyberry
copyberry Bot merged commit 0d49103 into main Jul 23, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/396d5b7e7463a305a5a828ba3a432b4a97e5d2b9 branch July 23, 2026 18:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 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