Skip to content

Close input admission while a turn finishes recording - #53452

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a57e44bd974e60e134183dab989795e2c3538596
Oct 12, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Close input admission while a turn finishes recording

Why

Inputs arriving during turn finalization could be queued after the final batch had already been drained, or recorded ahead of that batch.

What changed

Mark active turns as finishing before draining pending input. Reject injection into finishing turns and make late client responses and notifications wait until the final batch is recorded before appending to history. Continue accepting input into turns reserved but not yet started.

Testing

Extend the task-completion test to block final recording, verify that input admission is closed, and confirm that a late notification is recorded after queued input while preserving the notification truncation budget. Strengthen the retained-tool-output scenario to assert tool output names and ordering.

## Why

Inputs arriving during turn finalization could be queued after the final batch had already been drained, or recorded ahead of that batch.

## What changed

Mark active turns as finishing before draining pending input. Reject injection into finishing turns and make late client responses and notifications wait until the final batch is recorded before appending to history. Continue accepting input into turns reserved but not yet started.

## Testing

Extend the task-completion test to block final recording, verify that input admission is closed, and confirm that a late notification is recorded after queued input while preserving the notification truncation budget. Strengthen the retained-tool-output scenario to assert tool output names and ordering.

GitOrigin-RevId: a57e44bd974e60e134183dab989795e2c3538596
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a57e44bd974e60e134183dab989795e2c3538596 branch from 9401dae to 7a0a8ac Compare October 12, 2026 18:54
@copyberry
copyberry Bot merged commit 7a0a8ac into main Oct 12, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a57e44bd974e60e134183dab989795e2c3538596 branch October 12, 2026 18:54
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
πŸ“ Code Review πŸ”„ Running since 2026-10-12T18:54:37.700826Z 7a0a8ac 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.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 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.

1 participant