claude --resume crashes: undefined is not an object (evaluating '_.startsWith')
Resolved 💬 3 comments Opened Mar 20, 2026 by breathe Closed Mar 24, 2026
Description
claude --resume crashes when trying to resume a conversation that previously contained file edit tool uses.
Error
ERROR undefined is not an object (evaluating '_.startsWith')
/$bunfs/root/src/entrypoints/cli.js:3109:2259
Stack trace
- sc7 (cli.js:3109:2259)
- v27 (cli.js:2772:44388)
- MA (cli.js:680:20992)
- z5 (cli.js:680:39537)
- w7 (cli.js:680:50227)
- KUT (cli.js:680:86958)
- nt_ (cli.js:680:85919)
- dn (cli.js:680:85740)
- dv_ (cli.js:680:82483)
- AT (cli.js:680:6373)
Analysis
The crash is in sc7, which renders rejected/previous edit diffs when replaying conversation history. It calls _.startsWith() where _ is filePath, but filePath is undefined. The function at line 3109 processes structured patches and assumes filePath is always a string.
Reproduction
- Have a conversation that includes file edit tool uses (possibly rejected edits)
- Exit the conversation
- Run
claude --resume
Environment
- OS: macOS (Darwin 25.3.0, Apple Silicon M4 Max)
- Shell: fish
- Claude Code: latest (updated via
claude --update) - Runtime: Bun
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗