[BUG] Crash on conversation resume: "null is not an object (evaluating 'q.split')" in diff renderer
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?
Resuming a conversation with claude --resume crashes immediately with null is not an object (evaluating 'q.split'). The crash is in the structured patch renderer (pl7) which calls originalFile.split('\n') without a null guard. When originalFile is null (e.g. for a newly created file or one that no longer exists on disk), .split() throws a TypeError and the CLI exits.
What Should Happen?
The conversation should resume and render previous tool results gracefully, even when the original file content is unavailable. A null-safe access (q?.split(...)) or guard should prevent the crash.
Error Messages/Logs
ERROR null is not an object (evaluating 'q.split')
pl7 (/$bunfs/root/src/entrypoints/cli.js:3163:2024)
cX7 (cli.js:2603:45367)
h9 → a1 → D7_ → nV_ → BQT → iV_ → X7_ → a_ (rendering pipeline)
Steps to Reproduce
Steps to Reproduce:
1. Start a Claude Code conversation that involves file edits (Write or Edit tool) 2. End the conversation 3. Run claude --resume to resume it 4. CLI crashes with the above error before rendering the conversation
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.81
Claude Code Version
2.1.83
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Other
Additional Information
My terminal is Ghosty with fish shell
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗