[BUG] Error: Bad substitution: questionWithContext.replace when creating GitHub issue
Environment
- Platform (select one):
- Anthropic API
- AWS Bedrock
- Google Vertex AI
- Other:
- Claude CLI version:
- Operating System: macOS (Darwin 24.5.0)
- Terminal:
Bug Description
Claude Code crashes with a "Bad substitution" error when creating a GitHub issue. The error occurs in the questionWithContext.replace function.
Steps to Reproduce
- Use Claude Code in a git repository
- Attempt to create a GitHub issue
- Claude Code crashes with the substitution error
Expected Behavior
Claude Code should successfully help create a GitHub issue without crashing.
Actual Behavior
Claude Code crashes with the following error:
Error: Bad substitution: questionWithContext.replace
at E (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:2204)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:2863
at Array.map (<anonymous>)
at pm2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:1942)
at Object.A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:3027)
at bt1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1497:3496)
at Cy (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1503:77)
at Object.isReadOnly (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1575:3322)
at Object.isConcurrencySafe (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1575:3238)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1901:22248
Additional Context
- Attempted to uninstall and reinstall Claude Code completely - issue persists
- The original crash happens when attempting to create GitHub issues
- claude doctor command also fails with the following error:
ERROR Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported
Error: Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
at handleSetRawMode (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:608:3732)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:617:259
at GI (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:21374)
at VY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:40861)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:39057
at mP1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:76:79278)
at Immediate.kP1 [as _onImmediate] (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:76:79696)
at process.processImmediate (node:internal/timers:511:21)
- Multiple Claude Code components appear to have terminal compatibility problems
- This appears to be a systemic issue that cannot be resolved through reinstallation
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗