Skip to content

Preserve active turn approvals when an earlier turn finishes late - #61801

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

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/521f4fb74728b3e70572839b2e73d2d2b2735f35

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Preserve active turn approvals when an earlier turn finishes late

Why

A turn's terminal event can arrive after the next turn has started, cancelling the newer turn's pending approval requests and incorrectly changing the thread's active status.

What changed

Track the latest started turn in the app server. Only let completion or abort events for that turn cancel pending server requests and update thread watch status, preserving the existing behavior when no started turn is recorded.

Testing

Add a regression test that delays one turn's completion until the next turn requests command approval, then verifies that the thread remains waiting on approval and the approval can still be accepted to execute the command.

…1801)

## Why

A turn's terminal event can arrive after the next turn has started, cancelling the newer turn's pending approval requests and incorrectly changing the thread's active status.

## What changed

Track the latest started turn in the app server. Only let completion or abort events for that turn cancel pending server requests and update thread watch status, preserving the existing behavior when no started turn is recorded.

## Testing

Add a regression test that delays one turn's completion until the next turn requests command approval, then verifies that the thread remains waiting on approval and the approval can still be accepted to execute the command.

GitOrigin-RevId: 521f4fb74728b3e70572839b2e73d2d2b2735f35
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/521f4fb74728b3e70572839b2e73d2d2b2735f35 branch from 93c4232 to 662a634 Compare November 16, 2026 12:14
@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-16T12:14:43.107565Z 93c4232 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 662a634 into main Nov 16, 2026
9 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/521f4fb74728b3e70572839b2e73d2d2b2735f35 branch November 16, 2026 12:14
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 662a634e Deployed Nov 16, 2026 by arkpain44-ship-it via Identify potential duplicates (all issues) #63793
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.