Skip to content

Isolate app-server turn metadata by turn ID - #61817

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/91f022d885c67c7d8982091c72325f1d701569a6
Nov 16, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/91f022d885c67c7d8982091c72325f1d701569a6

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Isolate app-server turn metadata by turn ID

Why

A turn can complete after the next turn has started. Sharing one turn summary lets late completion events consume the next turn's metadata and clear its command tracking.

What changed

Track turn summaries and command start times by turn ID so errors, timestamps, final agent messages, and command lifecycle notifications stay associated with the correct turn. Read and remove only the completing turn's state, and clear tracked state when listeners are replaced or removed.

Initialize summaries for inline reviews that can finish before their delegate emits TurnStarted.

Testing

Extend regression coverage to check that overlapping turns retain their own errors, completed turns include start timestamps, and the next turn's approved command emits one start and one completion notification despite a late completion from the previous turn.

## Why

A turn can complete after the next turn has started. Sharing one turn summary lets late completion events consume the next turn's metadata and clear its command tracking.

## What changed

Track turn summaries and command start times by turn ID so errors, timestamps, final agent messages, and command lifecycle notifications stay associated with the correct turn. Read and remove only the completing turn's state, and clear tracked state when listeners are replaced or removed.

Initialize summaries for inline reviews that can finish before their delegate emits `TurnStarted`.

## Testing

Extend regression coverage to check that overlapping turns retain their own errors, completed turns include start timestamps, and the next turn's approved command emits one start and one completion notification despite a late completion from the previous turn.

GitOrigin-RevId: 91f022d885c67c7d8982091c72325f1d701569a6
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/91f022d885c67c7d8982091c72325f1d701569a6 branch from e79ff41 to 2309bae Compare November 16, 2026 14:08
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-16T14:08:47.226463Z e79ff41 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 2309bae into main Nov 16, 2026
10 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/91f022d885c67c7d8982091c72325f1d701569a6 branch November 16, 2026 14:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 2309bae1 Deployed Nov 16, 2026 by Asker994 via Identify potential duplicates (open issues fallback) #63795
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