Skip to content

termio: send the config change color scheme report directly - #14834

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
jcollie:termio-config-color-scheme-report
Oct 26, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
jcollie:termio-config-color-scheme-report

Conversation

@jcollie

@jcollie jcollie commented Oct 24, 2026

Copy link
Copy Markdown
Member

StreamHandler.changeConfig queued a color_scheme_report message into the termio mailbox. changeConfig runs on the io thread, which is the only reader of that mailbox, so when the mailbox was full (for example, from a burst of query replies queued by the reader thread) the io thread blocked forever pushing to itself. Every other thread then blocked on its next send to the same mailbox, freezing Ghostty on a config reload.

Write the report from Termio.changeConfig instead, using the same colorSchemeReportLocked the message handler uses. The report still follows the config update in order with other output.

Fixes: #14833

AI disclosure: Claude Code was used in the preparation of this PR.

StreamHandler.changeConfig queued a color_scheme_report message into the
termio mailbox. changeConfig runs on the io thread, which is the only
reader of that mailbox, so when the mailbox was full (for example, from
a burst of query replies queued by the reader thread) the io thread
blocked forever pushing to itself. Every other thread then blocked on
its next send to the same mailbox, freezing Ghostty on a config reload.

Write the report from Termio.changeConfig instead, using the same
colorSchemeReportLocked the message handler uses. The report still
follows the config update in order with other output.

Fixes: ghostty-org#14833
@jcollie
jcollie requested a review from a team as a code owner October 24, 2026 21:56
@jcollie jcollie added this to the 1.4.0 milestone Oct 24, 2026
@mitchellh
mitchellh merged commit 87b6596 into ghostty-org:main Oct 26, 2026
106 checks passed
@jcollie
jcollie deleted the termio-config-color-scheme-report branch October 26, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config reload freezes Ghostty indefinitely when the IO mailbox is full

2 participants