[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
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗