[BUG] TypeError: Cannot read properties of null (reading 'split') in renderToolResultMessage

Resolved 💬 3 comments Opened Apr 23, 2026 by ahmedesmail07 Closed Apr 26, 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?

When using Claude Code, the CLI crashes with a TypeError in the renderToolResultMessage function. The error occurs during tool result rendering.

The command fails with:
TypeError: Cannot read properties of null (reading 'split')
at Object.GZ2 [as renderToolResultMessage]

What Should Happen?

Tool results should render without crashing.

Error Messages/Logs

ERROR  Cannot read properties of null (reading 'split')                                                                                                                                                     
                                                                                                                                                                                                              
  file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1641:1217                                                                                                                                     
                                                                                                                                                                                                              
  - Object.GZ2 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1641:1217)                                                                                                                      
  - mb2 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:2621:3861)                                                                                                                             
  - d7 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:20757)                                                                                                                              
  - xZ (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:39150)                                                                                                                              
  - Gd (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:49766)                                                                                                                              
  - mk (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:86041)                                                                                                                              
  - Ps (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:85015)                                                                                                                              
  - Kd (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:84840)                                                                                                                              
  - Id (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:81635)                                                                                                                              
  - J0 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:6273)

Steps to Reproduce

1- Open claude code using claude command
2- start resume a chat via /resume command
3- CRASH!

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.117

Claude Code Version

2.1.118

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗