What's Wrong?
Summary: With the fullscreen renderer active (CLAUDE_CODE_NO_FLICKER=1), Claude Code loses the TTY foreground process group immediately after rendering the welcome banner and gets suspended by the shell with zsh: suspended (tty input) (SIGTTIN). Mouse tracking and terminal queries are not cleaned up, so after the suspend the shell is flooded with mouse-tracking escape reports (35;20;10M...) and the terminal's Primary Device Attributes response (>|iTerm2 3.6.1164;1;2;4;6;17;18;21;22;52c) leaks into the prompt.
The same failure occurs on the fullscreen-renderer promo prompt path: with settings.json removed entirely, Claude Code shows "Try the new fullscreen renderer?" and suspends at that prompt the same way. So both entry points into the fullscreen code path are affected.
The identical setup works perfectly in Ghostty. Only iTerm2 is affected.
Environment
- Claude Code: 2.1.217 (native install), commit
9963b018d22c
- Platform:
darwin-arm64 (macOS, Apple Silicon)
- Terminal: iTerm2 3.6.1164
- Shell: zsh + starship prompt (no oh-my-zsh framework; cross-terminal
.zshrc shared with Ghostty, where everything works)
- Auth: Claude Max (claude.ai OAuth)
claude doctor: "No installation issues found"
Steps to Reproduce
- iTerm2 3.6.1164 on macOS (Apple Silicon), zsh.
~/.claude/settings.json containing "env": { "CLAUDE_CODE_NO_FLICKER": "1" }.
- Run
claude in any directory (reproduces in project dirs and in /tmp).
- Welcome banner renders, then immediately:
zsh: suspended (tty input) claude.
- Shell prompt returns with mouse tracking still enabled — moving the mouse spews
35;x;yM sequences; the DA response >|iTerm2 3.6.1164;...c appears at the prompt.
Variant B (promo prompt path):
- Remove/rename
~/.claude/settings.json.
- Run
claude — the "Try the new fullscreen renderer?" prompt renders.
- Process suspends with
zsh: suspended (tty input) at that prompt. Same escape-sequence leakage afterward.
What I ruled out
- Project state: reproduces in
/tmp with no project files. Largest per-session .jsonl files are ~14 MB (no oversized session files).
- User settings/plugins: reproduces with
~/.claude/settings.json removed (variant B above).
- The binary itself / global environment: the exact same binary, shell config, and settings work flawlessly in Ghostty — including the fullscreen renderer.
Expected Behavior
claude starts the interactive TUI in the foreground in iTerm2, as it does in Ghostty. If startup fails, terminal state (mouse tracking, alternate screen, pending queries) should be restored/consumed so escape sequences don't leak into the shell.
Workaround
Removing CLAUDE_CODE_NO_FLICKER and setting "tui": "default" in ~/.claude/settings.json avoids the fullscreen code path; Claude Code then starts normally in iTerm2. Alternatively, using Ghostty works with fullscreen enabled.
Notes
Possibly related to #11898 (CLI suspends / raw mode failures in iTerm2) — same SIGTTIN symptom, but here it is deterministically gated on the fullscreen renderer code path and is 100% reproducible on this setup.
What's Wrong?
Summary: With the fullscreen renderer active (
CLAUDE_CODE_NO_FLICKER=1), Claude Code loses the TTY foreground process group immediately after rendering the welcome banner and gets suspended by the shell withzsh: suspended (tty input)(SIGTTIN). Mouse tracking and terminal queries are not cleaned up, so after the suspend the shell is flooded with mouse-tracking escape reports (35;20;10M...) and the terminal's Primary Device Attributes response (>|iTerm2 3.6.1164;1;2;4;6;17;18;21;22;52c) leaks into the prompt.The same failure occurs on the fullscreen-renderer promo prompt path: with
settings.jsonremoved entirely, Claude Code shows "Try the new fullscreen renderer?" and suspends at that prompt the same way. So both entry points into the fullscreen code path are affected.The identical setup works perfectly in Ghostty. Only iTerm2 is affected.
Environment
9963b018d22cdarwin-arm64(macOS, Apple Silicon).zshrcshared with Ghostty, where everything works)claude doctor: "No installation issues found"Steps to Reproduce
~/.claude/settings.jsoncontaining"env": { "CLAUDE_CODE_NO_FLICKER": "1" }.claudein any directory (reproduces in project dirs and in/tmp).zsh: suspended (tty input) claude.35;x;yMsequences; the DA response>|iTerm2 3.6.1164;...cappears at the prompt.Variant B (promo prompt path):
~/.claude/settings.json.claude— the "Try the new fullscreen renderer?" prompt renders.zsh: suspended (tty input)at that prompt. Same escape-sequence leakage afterward.What I ruled out
/tmpwith no project files. Largest per-session.jsonlfiles are ~14 MB (no oversized session files).~/.claude/settings.jsonremoved (variant B above).Expected Behavior
claudestarts the interactive TUI in the foreground in iTerm2, as it does in Ghostty. If startup fails, terminal state (mouse tracking, alternate screen, pending queries) should be restored/consumed so escape sequences don't leak into the shell.Workaround
Removing
CLAUDE_CODE_NO_FLICKERand setting"tui": "default"in~/.claude/settings.jsonavoids the fullscreen code path; Claude Code then starts normally in iTerm2. Alternatively, using Ghostty works with fullscreen enabled.Notes
Possibly related to #11898 (CLI suspends / raw mode failures in iTerm2) — same SIGTTIN symptom, but here it is deterministically gated on the fullscreen renderer code path and is 100% reproducible on this setup.