[BUG] cct = TUI: render-duplication in turns containing Bash tool_use calls
## 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 - #67253 — render-duplication in substantive multi-paragraph turns with progressive contraction across resume cycles - **#67254
duplication-with-BASH-calls_pre-workaround.html
<img width="1680" height="1050" alt="Image" src="https://github.com/user-attachments/assets/3096f8b0-880e-4ce2-bd73-54bb79ecb4ec" />
(this issue)** — multi-turn duplication with Bash tool_use involvement (cluster-membership relative to #64567 open pending clean-test re-run)
- #67252 — character-level corruption with cold-boot persistence (the cluster's only corruption-family member) This issue covers: live-render duplication in multi-turn regions containing Bash tool_use calls; one-cycle clear observed under non-clean test conditions; cluster-membership relative to #64567 and the multi-paragraph defect is open pending clean-test re-run.
---
What's Wrong?
The Claude Code TUI (cct) live-render path produces multi-turn duplication in rendered scrollback when the affected region includes Bash tool_use calls. In the captured instance (hlmain session, 2026-06-07 ~21:57), a user prompt ("ok, what remains?") and the agent's response (titled "Tight enumeration") each appear twice in the rendered buffer, while the .jsonl records each exactly once. The duplication spans an agent turn that contains multiple Bash tool_use calls; whether the Bash calls are the trigger condition or incidental to the affected region is not yet characterized.
The duplication cleared after one cycle of the /exit + bash-clear + claude -c workaround, matching #64567's binary-clear pattern. Methodological caveat: the test was not clean — an intervening user turn at approximately 22:35 occurred between the live-rendered duplication and the workaround cycling. One-cycle-clear under non-clean test conditions is consistent with at least three mechanisms: #64567's binary clear regardless of intervening turn; intervening-turn-enables-clear-on-next-cycle; or progressive contraction (cf. the multi-paragraph-live-render-duplication pending issue) where the duplication was shallow enough that one cycle sufficed. Without re-running under clean conditions, the cluster-membership question stays open.
What Should Happen?
The cct UI should render multi-turn regions exactly as the .jsonl records them — one emission per turn, no doubling of user prompts or agent responses. The workaround-clear behavior should be characterizable cleanly without an intervening fresh user turn confounding the test.
How to reproduce
Not currently reproducible on demand; the original captures (2026-06-07) showed the pattern, but a re-trigger has not been attempted. Possible triggering conditions to investigate:
- Multi-turn agent output that includes Bash tool_use calls within the affected region
- Substantive multi-paragraph turn shape (similar to the multi-paragraph-live-render-duplication pending issue's trigger)
- Session-duration thresholds (the capture occurred after substantial preceding work in a long-running session)
For the captured instance:
- Operate a
cctsession that produces a substantive multi-turn region including Bash tool_use calls - Observe the duplication in the rendered buffer (user prompts + agent responses each appearing twice in the affected region)
/exit + bash-clear + claude -c— observe whether the duplication clears in one cycle (binary clear, matching #64567's pattern) or requires multiple cycles (progressive contraction, matching the multi-paragraph-live-render-duplication pending issue's pattern)- To distinguish cleanly, run the workaround cycle without an intervening fresh user turn (clean-test condition per the 06-08 cluster investigation)
Environment
cccversion: 2.1.153 (consistent with the 2026-06-07 morning capture at 12:03 documented in the multi-paragraph-live-render-duplication initial-evidence)- Platform: Linux (KDE Plasma 6 / Konsole)
- Conversation
.jsonlsource-of-truth: verified clean for the affected turn
Evidence
duplication-with-BASH-calls_pre-workaround.html— HTML export of Konsole scrollback showing duplicated multi-turn region (user prompt + agent response each appearing twice)duplication-with-BASH-calls_post-workaround-cycle1.html— HTML export of same region after one workaround cycle, showing single emission- 14 supporting screenshots (
Screenshot_20260607_223044.pngthroughScreenshot_20260608_133312.png) showing the capture sequence
Cluster-membership question (open)
This defect sits alongside three other cct live-render-path defects:
- #64007 — render-omission at turn transitions
- #64567 — render-duplication at Bash permission gates (cleared by one workaround cycle at original filing)
- Pending: multi-paragraph live-render-duplication — render-duplication at substantive multi-paragraph turns with progressive contraction across workaround cycles
The BASH-calls evidence shares features with multiple cluster members: multi-turn duplication shape (kin to the multi-paragraph-live-render-duplication trigger); Bash-tool-use involvement (kin to #64567's permission-gate trigger); one-cycle workaround clear (kin to #64567's binary-clear pattern, but caveat above). Without clean-test conditions, the evidence is consistent with multiple mechanisms.
Filing as a separate issue rather than as comment under any existing cluster member because: the trigger condition (multi-turn region with Bash calls) is distinct from #64567's permission-gate trigger and from the multi-paragraph-live-render-duplication's substantive-multi-paragraph trigger; the one-cycle clear under non-clean test does not commit the defect to any existing cluster member's behavior; a clean-test re-run would resolve the cluster-membership question, and until then separate filing preserves diagnostic visibility.
Anthropic's triage should feel free to consolidate this into an existing cluster member if codebase investigation confirms common origin.
Relationship to existing cluster
Member of the cct TUI live-render-path defect family. The unifying upstream class appears to be parsing-vs-structure fragility in cct TUI rendering. See #64007 follow-up comments for the broader cluster framing across the omission and duplication families.
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:
- Clean-test re-run: multi-turn region with Bash calls → workaround cycling without intervening user turn (the test condition that would resolve cluster-membership cleanly)
- ANSI raw output via
script-wrapped session - Hook-disabled A/B testing
- Terminal-portability tests against xterm, alacritty, gnome-terminal, kitty
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗