Skip to content

Separate thread startup metadata from replay history - #46294

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9d656063088c28f091d29e5862e4b9d894b7642c
Sep 17, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Separate thread startup metadata from replay history

Why

CodexThread retained the full SessionConfiguredEvent, including initial replay messages, and cloned it even for callers that only needed thread or session IDs.

What changed

Store ThreadStartupMetadata without replay history and expose it by reference through startup_metadata(). Update callers to read IDs from this metadata. When rejoining a running thread, rebuild the startup response using the supplied resume history for initial_messages.

Testing

Extend the resume test to verify that rejoining reuses the loaded thread, preserves startup metadata, and still returns the original replay messages as a prefix.

## Why

`CodexThread` retained the full `SessionConfiguredEvent`, including initial replay messages, and cloned it even for callers that only needed thread or session IDs.

## What changed

Store `ThreadStartupMetadata` without replay history and expose it by reference through `startup_metadata()`. Update callers to read IDs from this metadata. When rejoining a running thread, rebuild the startup response using the supplied resume history for `initial_messages`.

## Testing

Extend the resume test to verify that rejoining reuses the loaded thread, preserves startup metadata, and still returns the original replay messages as a prefix.

GitOrigin-RevId: 9d656063088c28f091d29e5862e4b9d894b7642c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9d656063088c28f091d29e5862e4b9d894b7642c branch from dcca1f3 to 17baabd Compare September 17, 2026 19:55
@copyberry
copyberry Bot merged commit 17baabd into main Sep 17, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9d656063088c28f091d29e5862e4b9d894b7642c branch September 17, 2026 19:55
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 17, 2026
@bigM13
bigM13 deployed to issue-triage September 17, 2026 19:57 — with GitHub Actions Active
@bigM13
bigM13 deployed to issue-triage September 17, 2026 19:57 — with GitHub Actions Active
@bigM13
bigM13 deployed to issue-triage September 17, 2026 19:57 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 17baabd0 Deployed Sep 17, 2026 by bigM13 via Generate label suggestions #46398
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.

3 participants