[BUG] Code Block Snippet displaying as Inline Code in chat
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?
Fenced code blocks returned by the assistant render as inline code instead of block-level code. The content appears in the same inline pill/badge style used for single-backtick spans, rather than as a multi-line block with its own background, padding, and (if applicable) syntax highlighting.
Previous Existing Issue but incorrectly closed: https://github.com/anthropics/claude-code/issues/11804
What Should Happen?
Expected behavior:
Triple-backtick fenced blocks should render as block-level code: full-width container, preserved line breaks, monospace, language-aware syntax highlighting, and a copy button (matching how bash / ts blocks render elsewhere in the UI).
Actual behavior:
The block renders as inline code — single-backtick styling — with content flowing inline with surrounding text. Line breaks inside the fence are not preserved visually, and there is no block container or copy affordance.
<img width="400" height="269" alt="Image" src="https://github.com/user-attachments/assets/a83164d6-0a6a-4f42-807c-dafb66b1894d" />
<img width="400" height="730" alt="Image" src="https://github.com/user-attachments/assets/fb5aff8a-f4bb-47bb-ac7c-1573f9653ed8" />
Error Messages/Logs
Steps to Reproduce
Have the assistant return a response containing a fenced code block, e.g.:
{
"name": "Jordan",
"role": "engineer",
"team": "engineering",
"active": true
}
Observe that it renders inline rather than as a block.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.150 (VS Code Extension)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
I am running the Claude Code VSCode Extension
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1 to this, and the others this was marked as a dup of. All were closed due to inactivity, not due to it being fixed, etc. This is really frustrating!!
Flagging this as still unresolved
@claude (@ashwin-ant maybe?)
<img width="704" height="728" alt="Image" src="https://github.com/user-attachments/assets/d1ee82bc-dc01-4468-b747-a8f68ec8b240" />
Claude Code code blocks in VS Code hard to read. Here's an another example in the high-contrast theme, where it is most unusable.
<img width="500" alt="Image" src="https://github.com/user-attachments/assets/1c1b01ed-87b4-4eed-a178-38a959af1a65" />
This is how a code block is supposed to look in Markdown:
Anthropic recently claimed 8x more code produced by the dev team with Claude Code, but here we see an issue as important as this one that has not even been acknowledged by Anthropic. What's going on?
Been like this for as long as I can remember. Maybe I can get Claude to figure out who we should @ direclty about this.
Edit: just terrible
<img width="849" height="464" src="https://github.com/user-attachments/assets/60fb6293-86ed-4b56-bac0-082131fc20bf" />