[BUG] Claude Node process crashes with `Error: Bad substitution: e.toString`
Resolved 💬 3 comments Opened Aug 30, 2025 by sebthom Closed Dec 5, 2025
Environment
- Platform (select one):
- [x ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.98 (Claude Code)
- Operating System: Windows 10
- Terminal: cmd
Bug Description
Claude code randomly crashes in the middle of processing.
Steps to Reproduce
n/a
Expected Behavior
Claude does not crash
Actual Behavior
The Node process exists in the middle of processing a request.
Additional Context
Error: Bad substitution: e.toString
at D (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:80:79195)
at file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:80:79854
at Array.map (<anonymous>)
at $Z9 (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:80:78933)
at Object.A (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:80:80018)
at pS6 (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:1757:28581)
at sS6 (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:1757:32072)
at file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:1757:32621
at Array.every (<anonymous>)
at f1B (file:///C:/scoop/persist/nodejs-lts/bin/node_modules/@anthropic-ai/claude-code/cli.js:1757:32559)
Node.js v22.18.0This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗