[BUG] VS Code extension crashes while rendering chat content: Cannot read properties of undefined (reading 'trim')
Resolved 💬 3 comments Opened Mar 20, 2026 by jszli Closed Mar 24, 2026
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?
Summary
The Claude Code VS Code extension intermittently fails to render chat content with:
Error rendering content: TypeError: Cannot read properties of undefined (reading 'trim')
Reloading the VS Code window temporarily clears the issue, but it comes back later.
Environment
- OS: Windows 11
- VS Code version: 1.112.0
- Claude Code extension version: claude opus 4.6
Behavior
- The chat panel sometimes crashes while rendering content
- The visible error is:
Error rendering content: TypeError: Cannot read properties of undefined (reading 'trim')
### What Should Happen?
Display normal rendering content
### Error Messages/Logs
```shell
Steps to Reproduce
Starting a conversation will bring it up.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.79.eld
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗