Skip to content

Restore raw mode after returning from external editors - #61713

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Restore raw mode after returning from external editors

Why

An editor's suspend/resume cycle can change terminal settings while crossterm still considers raw mode enabled, preventing Codex from restoring raw mode on return.

What changed

On Unix, clear crossterm's raw-mode cache before reapplying TUI terminal modes after an external program exits.

Testing

Extend the external-editor PTY test to simulate an editor restoring canonical mode with stty sane and verify that canonical input and echo are disabled after returning to Codex.

## Why

An editor's suspend/resume cycle can change terminal settings while crossterm still considers raw mode enabled, preventing Codex from restoring raw mode on return.

## What changed

On Unix, clear crossterm's raw-mode cache before reapplying TUI terminal modes after an external program exits.

## Testing

Extend the external-editor PTY test to simulate an editor restoring canonical mode with `stty sane` and verify that canonical input and echo are disabled after returning to Codex.

GitOrigin-RevId: 4ae151deaf073bddf5a1c7fdfb5a1b5f4a480375
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4ae151deaf073bddf5a1c7fdfb5a1b5f4a480375 branch from 1c1e757 to aea4c6e Compare November 16, 2026 00:14
@copyberry
copyberry Bot merged commit aea4c6e into main Nov 16, 2026
10 of 23 checks passed
@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-16T00:15:01.281674Z 1c1e757 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/4ae151deaf073bddf5a1c7fdfb5a1b5f4a480375 branch November 16, 2026 00:15
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — aea4c6ee Deployed Nov 16, 2026 by ajam1097 via Generate label suggestions #63704
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.