Skip to content

Handle TUI message submission receipts and preserve uncertain drafts - #59817

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ec4eb581e450488434bc4614ec59273d73ffd0a1
Nov 6, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Handle TUI message submission receipts and preserve uncertain drafts

Why

The TUI's cached active turn can be stale when a cloud message is submitted. A lost reply also leaves delivery uncertain, so automatically resending the draft risks submitting it twice.

What changed

  • Let the cloud server choose whether an Enter submission starts or steers a turn, and apply its receipt to the matching client message ID.
  • Keep Tab-queued input waiting until the admitted turn finishes, including before its start notification arrives.
  • Restore rejected submissions to the composer. Hold duplicate or unconfirmed submissions out of automatic delivery until history confirms them.
  • Reconcile saved drafts and pending steers by client message ID when resuming sessions, and preserve submissions belonging to other turns during interruption recovery.
  • Classify cloud preflight failures as invalid parameters so rejected queued input can be restored safely.

Testing

Add regression coverage for cloud receipt outcomes, queued-input ordering, rejected drafts, lost replies, interruption recovery, and session resume with identical message text but distinct client IDs.

…59817)

## Why

The TUI's cached active turn can be stale when a cloud message is submitted. A lost reply also leaves delivery uncertain, so automatically resending the draft risks submitting it twice.

## What changed

- Let the cloud server choose whether an Enter submission starts or steers a turn, and apply its receipt to the matching client message ID.
- Keep Tab-queued input waiting until the admitted turn finishes, including before its start notification arrives.
- Restore rejected submissions to the composer. Hold duplicate or unconfirmed submissions out of automatic delivery until history confirms them.
- Reconcile saved drafts and pending steers by client message ID when resuming sessions, and preserve submissions belonging to other turns during interruption recovery.
- Classify cloud preflight failures as invalid parameters so rejected queued input can be restored safely.

## Testing

Add regression coverage for cloud receipt outcomes, queued-input ordering, rejected drafts, lost replies, interruption recovery, and session resume with identical message text but distinct client IDs.

GitOrigin-RevId: ec4eb581e450488434bc4614ec59273d73ffd0a1
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ec4eb581e450488434bc4614ec59273d73ffd0a1 branch from 3142ccb to a142c90 Compare November 6, 2026 03:51
@copyberry
copyberry Bot merged commit a142c90 into main Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@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-11-06T03:51:51.567037Z 3142ccb 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 deleted the copyberry/codex-internal-to-codex-oss/ec4eb581e450488434bc4614ec59273d73ffd0a1 branch November 6, 2026 03:51
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — a142c90e Deployed Nov 6, 2026 by liuxt-hub via Translate non-English issue #24764
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