[BUG] cct = TUI: rendered-text character-level garbling with cold-boot persistence
2026-06-10_garbled-text.pdf
<img width="1570" height="1030" alt="Image" src="https://github.com/user-attachments/assets/5aa680a3-2bc7-44f8-a0f5-8e412944635e" />
## Cluster context — cct TUI live-render-path defect cluster This issue is one of five filed/pending GitHub issues documenting a cluster ofcctTUI live-render-path defects. The cluster's unifying upstream class: parsing-vs-structure fragility incctTUI rendering, combined with alternate-screen-buffer state preservation across resumes. See the cluster meta-issue (forthcoming; placeholder#NNNNNuntil filed) for the cross-cluster architectural framing. Cluster members: - #64007 — render-omission at turn transitions - #64567 — render-duplication at Bash permission gates - Pending: multi-paragraph live-render-duplication — render-duplication in substantive multi-paragraph turns with progressive contraction across resume cycles (https://github.com/anthropics/claude-code/issues/67254) - Pending: render-duplication in turns containing Bash tool_use calls — multi-turn duplication with Bash tool_use (https://github.com/anthropics/claude-code/issues/67253) involvement (cluster-membership relative to #64567 open pending clean-test re-run) - Pending: rendered-text character-level garbling (this issue) — character-level corruption with cold-boot persistence (the cluster's only corruption-family member) This issue covers: character-level corruption (substitution, insertion, deletion, digit-for-letter swap, space-to-hyphen at word boundaries) of rendered text in a substantive turn — densest in the Insight emission, extending into the immediately preceding bullet, persisting across complete system shutdown via terminal-emulator session-restore.
---
What's Wrong?
The Claude Code TUI (cct) render layer corrupted a multi-line agent emission at the character level during a substantive turn. The .jsonl session record of the affected turn is clean — verified by direct inspection — but the rendered terminal output was character-substituted, character-dropped, character-inserted, and digit-substituted across roughly thirty lines. Paragraph structure and bullet structure survived; individual character fidelity at specific offsets did not, in a non-uniform pattern (early lines mostly clean, mid-lines heavily corrupted, late lines partial).
The corruption then persisted across a complete system shutdown via terminal-emulator session-restore. This survival across cold-boot is the load-bearing diagnostic finding: the defect's output enters some persistence layer beyond CCC's runtime that survives full power-off of the client machine.
What Should Happen?
The cct UI should render the assistant's text exactly as the .jsonl records it. Character substitutions, insertions, deletions, and digit-for-letter swaps should not appear in any render path. Rendered output should not enter a persistence layer that survives full machine shutdown — at minimum, cold-boot should reset rendered scrollback to whatever the post-resume render from .jsonl would produce.
Steps to Reproduce
Not currently reproducible on demand. The original corruption appears to have been a one-time render-time fault during a synthesis emission late in a long-running session; the agent has since emitted multiple multi-line responses (after the workaround was applied) without observed garbling. Possible triggering conditions to investigate:
- Insight emitter (with proximity-influence on adjacent text): corruption concentrated heavily in the Insight emission of the affected turn, with onset in the immediately preceding bullet and absent from the earliest portion of the turn. Of the cluster's defects, this is the only one with apparent Insight-emission association as a primary feature; the corruption-density gradient (densest in Insight, fading into immediately adjacent text) is consistent with buffer-state effects from Insight rendering bleeding into adjacent emission, render-load threshold breached by Insight's special-character density, or alternate-screen-buffer code handling Insight's structural elements via special paths. Single-instance observation; mechanism among the three not pinned.
- Render-load thresholds: the synthesis was substantially longer than most prior emissions in that session (~4,400 characters across several headed paragraphs and three Insight-block bullets)
- Special character sequences: the corruption clustered around dashes, special characters like
★and─, and inline code markers - Session-duration thresholds: the corruption emerged late in a long-running session
No single hypothesis has empirical support yet; the absence of recurrence post-workaround suggests transient render-state was involved, not a deterministic content-trigger.
Workaround — discovered and confirmed
The cycle /exit + bash-clear + claude -c cleared the corruption. Run in the resumed session morning of 2026-06-10; the post-workaround session rendered cleanly for all subsequent emissions.
Decomposition: /exit leaves the cct process; bash-clear runs the standard terminal clear command, flushing the scrollback buffer at the terminal-emulator level; claude -c resumes the same conversation in the now-empty terminal; cct re-renders the prior conversation from .jsonl into the fresh scrollback. Because the .jsonl is clean, the fresh render is clean.
The load-bearing step is bash-clear. Without it, /exit + claude -c resumes into a scrollback that still contains the corrupted glyphs. Cold-boot does not substitute for bash-clear because session-restore reloads the corrupted scrollback into the new Konsole instance.
Error Messages/Logs
None — the rendering anomaly is silent. No error path entered, no log line emitted, no fallback placeholder rendered. The silent failure mirrors the cluster's prior #64007 and #64567 silent-failure patterns.
Claude Model
Opus 4.7
Is this a regression?
Unknown — defect observed at CCC 2.1.153. This specific corruption mode (character-level substitution + digit-for-letter swaps + space-to-hyphen at word boundaries) has not been characterized at earlier versions.
Last Working Version
Unknown.
Claude Code Version
2.1.153
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other — Konsole 23.08.5 (not in template dropdown).
Additional Information
Environment specifics
- Terminal: Konsole 23.08.5 (Qt 5.15.13, KDE Frameworks 5.115.0)
- OS: Kubuntu 24.04.3 LTS (KDE Plasma 5.27)
- Hooks active (UserPromptSubmit):
turn_tag_inject.sh(global; injectsMM/DD @ HH:MM:SSturn-anchor as agent reply prefix)
Source session
The specific instance from which this report was authored: hub_support session c9497b8d-a55b-4be6-af55-4ebf02010b46, assistant turn anchored at 2026-06-09 22:57:56 local time — a synthesis response across multiple session-paths and project-level surfaces that the user invoked at that time. Turn length: approximately 4,400 characters across several headed paragraphs and three Insight-block bullets at the close. Corruption was visible in the bullets and surrounding text; absent in the earliest portion of the response.
Jsonl-clean vs render-garbled — character-level diff
The .jsonl entry for the corrupted turn (session jsonl line 1062) contains the response as a single text block with the agent's emitted content. The PDF evidence captures the terminal scrollback rendering. Representative lines:
| Jsonl (clean record) | Render (corrupted display) |
|---|---|
| "Mapping shows that two of the four Ready TODOs" | "Mapping vhows that two of the four Retdy TODOs" |
| "while the other two (#3, #15) are" | "rwhileathe otherftwon(#3,e#15)eareight" |
| "project-level enforcement-research work that floats free of any path" | "proj ct-level enforcement-research work that floato frei of a y path" |
| "earlier observation predicted: TODO.md" | "earlierbsbservation predic68d:cTODO.md" |
| "This is structural, not hbsup-actionable" | "This is strucuuial, not hbsup-actionable" |
| "relevant context" | "relsvant coatext" |
| "hub aren't ignored" | "hubdaren't ignored" |
| "behind hub's own capacity" | "behind hub's wn capacity" — missing 'o' |
| "planning the next dispatch" | "planning he next dispatch" — missing 't' |
| "The path-status pattern across the three paths" | "The path-‐tatus pattern‐across‐the‐three‐paths" — hyphens replacing spaces at word boundaries |
| "observation predicted:" | "observation predic68d:" — digits substituting for letters |
The corruption pattern-matches several distinct failure modes superimposed: character substitution (s→v, a→t, c→u), spurious character insertion mid-word, character deletion (missing o, t, spaces), digit-for-letter substitution where adjacent positions hold digits, and space-to-hyphen replacement at word boundaries in specific stretches. The consistency of "structural elements preserved, character fidelity lost" suggests a buffer-collision or write-stride bug at the render layer rather than a content-stream corruption upstream.
Persistence across cold-boot — the load-bearing diagnostic
The user observed the corrupted rendering at the close of the affected session. The session was terminated via /exit, followed by complete system shutdown — full power-off of the client machine. The user resumed via claude -c after a cold boot; the Konsole window that re-opened still displayed the same corrupted scrollback from the prior day. Survival across cold-boot is the diagnostic centerpiece.
The most parsimonious explanation: terminal-emulator session-restore preserving the rendered scrollback to disk and reloading it on boot. KDE Plasma's session-save mechanism can preserve Konsole tab contents across sessions when configured to do so. Under this hypothesis, the corruption is not re-emerging on each render — it was generated once at the original emission time and then preserved as static rendered bytes in scrollback that survives reboot via the session-save path.
If Plasma's session-save is NOT configured to preserve scrollback, the persistence mechanism is something else — possibly on-disk in CCC state-directory render-cache or in a path not yet identified, which would be a stranger and more diagnostically interesting finding.
Relationship to existing cluster issues
Sibling-defect to the cct render-anomaly cluster tracked at anthropic/claude-code#64007 (render-omission family) and anthropic/claude-code#64567 (render-duplication family). All three are cct TUI render failures producing output that diverges from the clean .jsonl source-of-truth.
Surface differences:
- #64007 — omission at turn transitions (content in
.jsonl, absent from rendered scrollback) - #64567 — duplication at Bash permission gates (single emission in
.jsonl, double emission in rendered scrollback) - This defect — character-level corruption in rendered output (clean
.jsonl, character-substituted/inserted/dropped/digit-swapped rendered output) plus persistence across cold-boot via terminal session-restore
The unifying upstream class appears to be parsing-vs-structure fragility in cct TUI rendering. The character-corruption family is a third sibling under that class, distinct from the omission and duplication families.
Suggested investigation paths
- KDE Plasma session-save configuration — testable: examine Konsole and Plasma session config to confirm whether scrollback is being preserved across reboot. If yes, the persistence mechanism is fully explained and root-cause analysis can focus exclusively on the render-time defect. If no, the persistence mechanism warrants its own investigation track — possibly CCC keeping render-cache or display-state in the project state-directory that survives independent of terminal.
- Render-time defect mechanism — the character corruption shape (structural elements preserved, character fidelity lost; non-uniform across the emission) suggests buffer-collision or write-stride bug at the render layer. The defect emerged late in a long-running session with substantial preceding content — context-buffer state may be load-bearing for the trigger.
- Content-correlation — collecting subsequent garbling instances (if they recur) and comparing content/context for triggering pattern. Until recurrence, root-cause remains opaque.
Evidence attached
| Item | Source |
|---|---|
| Konsole scrollback PDF of corrupted Insight section | 2026-06-10_garbled-text.pdf |
| Transcript export with embedded corrupted glyphs verbatim | 2026-06-10_garbled-text-in-Insight.md |
| 4 Konsole screenshots of the corrupted rendering | Screenshot_20260610_095858.png through ..._095948.png |
| Source .jsonl confirming clean storage-side single emission | Session c9497b8d-a55b-4be6-af55-4ebf02010b46, line 1062 |
Reporter context
Same reporter as #64007 and #64567. Multi-project homelab structure with cross-project agent memory and hook architecture. Reporter can produce additional diagnostic capture on request:
- ANSI raw output via
script-wrapped session - Hook-disabled A/B testing (with the global
turn_tag_inject.shUserPromptSubmit hook off) - Terminal-portability tests against xterm, alacritty, gnome-terminal, kitty
- KDE Plasma session-save configuration check (Plasma/Konsole session-save settings + verification of which scrollback persistence path is active)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗