[BUG] Numbered list with a fenced code block inside an item renders duplicated/partial, repeats a list number
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 the assistant outputs a numbered list where a list item contains a fenced code block followed by continuation text, the terminal
renderer (1) repeats a list number instead of incrementing — two "2." items — and (2) leaves a partial earlier render of the list in scrollback (cut
mid-sentence at a streaming chunk boundary) before re-rendering the complete list, so the block appears duplicated. Appears to be a streaming re-render +
markdown list/code-block interaction, not a content issue — the underlying message was a single correctly-numbered list.
What Should Happen?
List renders once, numbered sequentially.
Error Messages/Logs
Steps to Reproduce
- Ask claude code in terminal to create a numbered list of steps for something that will include a fenced code block. See below for the output received that caused the issue.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.186 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Output was as follows: (note the two number "2" in the steps and the list itself generated twice.
- Start the app:
.venv/Scripts/python app.py
- Check /health — open http://localhost:5000/health. Expect:
{"status": "ok", "version": "v0.1.0 · edd999c"}
- The SHA should be edd999c (your current HEAD) — not dev. If it shows dev,
the local git rev-parse fallback isn't resolving.
- Check the footer — log in and load the dashboard (or any app page). At the
- Start the app:
.venv/Scripts/python app.py
- Check /health — open http://localhost:5000/health. Expect:
{"status": "ok", "version": "v0.1.0 · edd999c"}
- The SHA should be edd999c (your current HEAD) — not dev. If it shows dev,
the local git rev-parse fallback isn't resolving.
- Check the footer — log in and load the dashboard (or any app page). At the
bottom, centered and muted, you should see v0.1.0 · edd999c. Confirm it does
not appear on the logged-out login/landing pages (by design — footer is in the
authenticated layout only).
- Stop the server (Ctrl+C).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗