claude-code - 💡(How to fix) Fix [BUG] SIGWINCH relayout spills duplicate transcript + status bar stacking in Zellij (amplified repro) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52304Fetched 2026-04-24 06:10:43
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1

Root Cause

This is the Zellij-specific amplification of #46834. The same root cause (ink/yoga re-emitting full transcript on SIGWINCH) manifests more severely inside Zellij because Zellij generates SIGWINCH on every tab switch, pane resize, and layout change — not just manual window resizes.

Code Example

~/Code/my-ops on main [Sonnet 4.6] ctx:56%
  ⏵⏵ bypass permissions on (shift+tab to cycle)
Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
  ⏵⏵ bypass permissions on (shift+tab to cycle)
Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
  ⏵⏵ bypass permissions on (shift+tab to cycle)
Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
───────────────────────────────────────────────────────────────────
  ~/Code/my-ops on main [Sonnet 4.6] ctx:56%     ← second copy
  ⏵⏵ bypass permissions on (shift+tab to cycle)
Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code

  [response content starting from mid-point — earlier content overwritten]
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code: v2.1.117
  • OS: macOS Darwin 25.1.0 (Apple Silicon)
  • Terminal: Ghostty
  • Multiplexer: Zellij 0.44.1
  • Model: Claude Sonnet 4.6 / Opus 4.6

Related issues

This is the Zellij-specific amplification of #46834. The same root cause (ink/yoga re-emitting full transcript on SIGWINCH) manifests more severely inside Zellij because Zellij generates SIGWINCH on every tab switch, pane resize, and layout change — not just manual window resizes.

What happens

During an active Claude Code session inside a Zellij pane, the bottom status bar lines (ctx%, permission mode, auto-update notice) are repeatedly appended into the outer terminal's (Ghostty's) scrollback as new output lines instead of redrawing in place. Simultaneously, earlier response content is partially overwritten.

Captured via zellij action dump-screen --pane-id terminal_34 --full:

  ~/Code/my-ops on main [Sonnet 4.6] ctx:56%
  ⏵⏵ bypass permissions on (shift+tab to cycle)
                          ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
                          ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
  ⏵⏵ bypass permissions on (shift+tab to cycle)
                          ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
  ⏵⏵ bypass permissions on (shift+tab to cycle)
                          ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
───────────────────────────────────────────────────────────────────
  ~/Code/my-ops on main [Sonnet 4.6] ctx:56%     ← second copy
  ⏵⏵ bypass permissions on (shift+tab to cycle)
                          ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code

  [response content starting from mid-point — earlier content overwritten]

Each status bar block shows a different ctx% value (56% → 53% → 52%), confirming these are separate relayout events triggered by token streaming updates, not a single stale redraw.

Why Zellij amplifies the issue

Zellij sends SIGWINCH to pane processes on:

  • Tab switch (switching away from and back to a tab)
  • Pane resize (any layout change)
  • Session attach/detach

In a long-running session (12+ hours, 10+ panes), this results in dozens of SIGWINCH events per hour. Each event triggers a full ink/yoga relayout that re-emits the entire transcript + status bar into Ghostty's primary scrollback.

After ~12 hours: the same response block appears 10–20 times in the scrollback, each copy at a slightly different column width and with a different ctx% in the status bar, making scrollback effectively unusable.

Content overwriting

Beyond duplication, each relayout re-emits content from a cursor position that overwrites the preceding response. In the dump above, a ~5-point numbered list had only point 5 onward visible — points 1–4 were overwritten by a status bar relayout that placed the cursor at the wrong screen position.

Repro steps

  1. Open Claude Code inside a Zellij pane
  2. Send a prompt that produces a long response (e.g. a multi-section analysis)
  3. While the response is streaming, switch to a different Zellij tab and back
  4. Observe: the status bar lines (ctx%, permission mode) appear as new output lines below the response
  5. Repeat step 3 a few times — each cycle adds another copy

Alternatively: resize the Zellij pane or the Ghostty window during streaming.

Expected behavior

Status bar updates should redraw in place (cursor-addressed write to fixed screen rows) without emitting new output lines or affecting the scrollback.

Notes

  • CLAUDE_CODE_NO_FLICKER=1 does not resolve this in Zellij — it introduces a separate scroll artifact (#42930)
  • The issue appears to originate around v2.1.68 (1M context release), per community reports
  • Confirmed still present in v2.1.117

See also

  • #46834 — canonical issue (non-Zellij, general SIGWINCH trigger)
  • #46983 — same symptom on Terminal.app
  • #46462 — same symptom on window enlarge (closed as duplicate of #46834)
  • #42930 — CLAUDE_CODE_NO_FLICKER=1 Zellij artifact (closed without fix)

extent analysis

TL;DR

The issue can be mitigated by finding a way to prevent Zellij from sending SIGWINCH to pane processes on every tab switch, pane resize, and layout change, or by modifying Claude Code to handle SIGWINCH events more robustly.

Guidance

  • Investigate Zellij configuration options to reduce or disable SIGWINCH events, potentially improving performance and reducing the issue's severity.
  • Consider modifying Claude Code to handle SIGWINCH events more efficiently, possibly by optimizing the relayout process or improving cursor positioning.
  • Review related issues (#46834, #46983, #46462) for potential insights or workarounds that could be applied to this specific Zellij scenario.
  • Test the CLAUDE_CODE_NO_FLICKER=1 environment variable again, despite the introduced scroll artifact, to see if it provides any improvement in this specific version (v2.1.117).

Example

No specific code example is provided due to the complexity and specificity of the issue, which involves interactions between Zellij, Claude Code, and terminal behavior.

Notes

The issue's root cause seems to be related to how Zellij handles SIGWINCH events and how Claude Code responds to these events, particularly in terms of relayout and cursor management. The problem is amplified by Zellij's behavior but is not exclusive to it, as indicated by related issues on different terminals and environments.

Recommendation

Apply a workaround, such as investigating Zellij configuration changes or Claude Code modifications, as a direct fix is not immediately apparent and may require deeper changes to either Zellij, Claude Code, or both.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Status bar updates should redraw in place (cursor-addressed write to fixed screen rows) without emitting new output lines or affecting the scrollback.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING