[BUG] Ghostty tab freezes during long claude session — diagnostics for closed #5939

Resolved 💬 1 comment Opened May 9, 2026 by torselen Closed Jun 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running claude in a Ghostty terminal tab on macOS Tahoe, the tab eventually freezes completely — keyboard input is dropped, Ctrl-C and Ctrl-Z are inert, scrollback stops responding. Other Ghostty tabs in the same window stay fully responsive, so it's a per-tab/per-surface wedge, not a Ghostty-wide hang.

This was previously reported as #5939 and closed without investigation (no maintainer comment, no fix, auto-locked). The pattern is reproducible enough to be worth filing again with stack-trace evidence.

Why this is filed against claude-code (and not just Ghostty):

  1. The trigger involves claude-code — long-running claude TUI session combined with VS Code git commits in the same .git/ directory. Other long-running TUIs in the same Ghostty don't trip it. Something specific to claude's terminal interaction (rapid screen redraws? alt-screen toggling? large output bursts?) escalates a Ghostty-side bug into a hard freeze.
  2. A claude-code-side mitigation might dodge the bug while the upstream fix lands — coalesced redraws, smaller batched writes, reduced alt-screen churn.
  3. Other terminals don't reproduce — Terminal.app, iTerm2, and VS Code's integrated terminal all run the same claude session without freezing.

Parallel upstream report: https://github.com/ghostty-org/ghostty/discussions/12636

What Should Happen?

The Ghostty tab should continue to respond to keyboard input throughout the claude session, regardless of how long it has been running or how much git activity has happened in the same project.

Error Messages/Logs

Captured live during a freeze (5 s user-stack `sample` of ghostty + 2 min unified log + ps state). Triage from sample.txt:


=== Pattern check ===
SecureKeyboardInput / TSMProcessRawKeyCode : 0   (not Tahoe SKI freeze, ghostty #9590)
pasteboard / NSPasteboard                  : 0   (not a clipboard hang)
CGSConnectionByID / WindowServer           : 0   (not WindowServer-side)
kevent / libxev                            : 11  (normal idle waits)

=== Main thread (4017 samples / 5 s, 1 ms granularity) ===
4016/4017: mach_msg inside _DPSNextEvent (idle event-loop wait)
   1/4017: cold-path dispatch:
            _dispatch_main_queue_drain.cold.6
              -> object.Object.setProperty__anon_516913 (ghostty)
              -> -[CALayer setContents:]
              -> CA::Layer::begin_change
              -> +[NSNull null]   (i.e. setContents:nil)

=== Process state ===
Ghostty 1.3.1, 22 threads, 3 surfaces alive


Full sample.txt (232 KB), unified-log.txt (24 KB), state.txt available on request.

Steps to Reproduce

  1. Open Ghostty (1.3.1, macOS Tahoe 26.4.1, Apple Silicon) in a project folder containing .git/.
  2. Start claude and use it for an extended session — multiple turns, code edits, file reads.
  3. In parallel, make several git commits in the same project via VS Code's integrated git plugin.
  4. Eventually the Ghostty tab running claude becomes totally unresponsive — keystrokes ignored, Ctrl-C / Ctrl-Z dead.
  5. Other Ghostty tabs continue working normally.
  6. Closing the affected tab is the only recovery; the Ghostty process itself does not need to be killed.

Probabilistic — not every session, but recurring enough to be a regular productivity hit.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.133

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • macOS: Tahoe 26.4.1 (Apple Silicon, M-series, build 25E253)
  • Ghostty: 1.3.1
  • Editor running parallel git commits: VS Code (built-in git plugin), same project directory
  • Workaround: close the frozen tab. The Ghostty process itself is fine.
  • Original closed report: #5939 (closed by reporter on 2025-08-18 without resolution, auto-locked 7 days later)
  • Parallel upstream report: https://github.com/ghostty-org/ghostty/discussions/12636

Diagnostic bundle (sample.txt 232 KB, unified-log.txt 24 KB, state.txt) — happy to share via gist on request; non-maintainers can't attach files to discussions in the Ghostty repo, hence the inline excerpts in the Error Messages/Logs section.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗