[BUG] /init command crashes with timeout error when auto-accept edits is disabled
Description:
## Bug Description
The /init command crashes with a timeout error when auto-accept edits is
disabled and the user doesn't respond to the edit confirmation prompt within
1000ms.
## Steps to Reproduce
- Ensure auto-accept edits is disabled when using within VS Code (happens outside VS code as well)
- Run
/initcommand - When prompted to confirm CLAUDE.md edit, wait without responding
- CLI crashes after 1000ms timeout
## Expected Behavior
The CLI should handle the timeout gracefully, either:
- Extending the timeout period
- Canceling the operation and returning to the prompt
- Providing a clear error message without crashing
## Actual Behavior
Error: Timeout waiting after 1000ms
at fz2 (file:///Users/madhan/.nvm/versions/node/v22.16.0/lib/node_modules/
@anthropic-ai/claude-code/cli.js:1363:11606)
at process.processTicksAndRejections
(node:internal/process/task_queues:105:5)
at async Iz5 (file:///Users/madhan/.nvm/versions/node/v22.16.0/lib/node_mo
dules/@anthropic-ai/claude-code/cli.js:1924:11636)
at async F (file:///Users/madhan/.nvm/versions/node/v22.16.0/lib/node_modu
les/@anthropic-ai/claude-code/cli.js:1924:10490)
## Environment
- Node.js version: v22.16.0
- Platform: macOS (Darwin 24.5.0)
- 1.0.35 (Claude Code)
- VS Code Version: 1.101.2 (Universal)
## Workaround
Enable auto-accept edits before doing /init
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗