Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Reference implementation for
openai/codex. Upstream blocks external pull-request creation, so this PR is hosted in the fork for maintainer review and cherry-picking.Codex probes OSC 10/11 once, then keeps that palette for the process lifetime. A long-running TUI therefore keeps stale composer and syntax colors after Ghostty changes theme, sometimes producing unreadable dark-on-dark or light-on-light text until Codex restarts.
Related: openai#18942, openai#14105, openai#38575.
How
CSI ? 997 ; 1 nandCSI ? 997 ; 2 nthrough the crossterm event stream.The crossterm event variant is in openai-oss-forks/crossterm#3. This branch temporarily pins that public implementation commit; the pin should move back to the OpenAI fork after the dependency PR merges.
Validation scope: Ghostty 1.2.3 through tmux 3.6a on macOS. Terminals that emit DEC mode 2031 reports should follow the same path; unsupported terminals ignore the mode and keep existing behavior.
Verification
just test -p codex-tui: 3976 passed, 6 skipped.just fix -p codex-tui: passed.just bazel-lock-updateandjust bazel-lock-check: passed.~ codex & piotr