Skip to content

Keep startup modals protected when terminal input draining times out - #52968

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/476bedbd45f13a15d0019e4ce2e875406d4a53ca
Oct 10, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Keep startup modals protected when terminal input draining times out

Why

An unfinished terminal control sequence can prevent buffered input from draining before a startup modal appears. Propagating that timeout aborts modal handling instead of keeping the screen available for an explicit user decision.

What changed

Treat input-drain timeouts as a reason to keep startup modal input quarantined. Discard key, paste, and mouse events while retrying the drain, and continue processing server events. Preserve this protection when another request resolves and when the agent overview is restored after reconnecting.

Testing

Add a Unix PTY regression test covering unfinished control sequences, queued approval and overview shortcuts, unrelated request resolution, and overview reconnection. Verify that buffered input cannot answer an approval or create a task, while fresh shortcuts work after the drain completes.

…52968)

## Why

An unfinished terminal control sequence can prevent buffered input from draining before a startup modal appears. Propagating that timeout aborts modal handling instead of keeping the screen available for an explicit user decision.

## What changed

Treat input-drain timeouts as a reason to keep startup modal input quarantined. Discard key, paste, and mouse events while retrying the drain, and continue processing server events. Preserve this protection when another request resolves and when the agent overview is restored after reconnecting.

## Testing

Add a Unix PTY regression test covering unfinished control sequences, queued approval and overview shortcuts, unrelated request resolution, and overview reconnection. Verify that buffered input cannot answer an approval or create a task, while fresh shortcuts work after the drain completes.

GitOrigin-RevId: 476bedbd45f13a15d0019e4ce2e875406d4a53ca
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/476bedbd45f13a15d0019e4ce2e875406d4a53ca branch from 635dcca to 34f33e4 Compare October 10, 2026 19:23
@copyberry
copyberry Bot merged commit 34f33e4 into main Oct 10, 2026
1 check passed
@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-10T19:23:40.100146Z 635dcca 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/476bedbd45f13a15d0019e4ce2e875406d4a53ca branch October 10, 2026 19:23
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
@nashspence
nashspence deployed to issue-triage October 10, 2026 19:30 — with Image GitHub Actions Active
@nashspence
nashspence deployed to issue-triage October 10, 2026 19:30 — with Image GitHub Actions Active
@nashspence
nashspence deployed to issue-triage October 10, 2026 19:30 — with Image GitHub Actions Active
@nashspence
nashspence deployed to issue-triage October 10, 2026 19:31 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 34f33e4a Deployed Oct 10, 2026 by mirceamihalache-maker via Generate label suggestions #54205
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.

4 participants