[BUG] TypeError: B.allowedTools is not iterable
● Environment
- Platform (select one):
- Claude CLI version: 1.0.83 (Claude Code)
- Operating System: Windows 11
- Terminal: Command Prompt / PowerShell
Bug Description
Claude Code CLI throws a "TypeError: B.allowedTools is not iterable" error when running the claude command in
certain project directories, preventing the CLI from starting. The error occurs consistently in specific
directories while working normally in others within the same parent directory.
Steps to Reproduce
- Install Claude Code CLI v1.0.83: npm install -g @anthropic-ai/claude-code
- Navigate to a project directory that triggers the error
- Run claude command (without any arguments)
- Observe the TypeError
Expected Behavior
Claude Code CLI should start normally and enter interactive mode, as it does in other directories.
Actual Behavior
The CLI crashes immediately with the following error:
TypeError: B.allowedTools is not iterable
at Wq1 (file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:739:1373)
at M5B (file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:858:12199)
at tT0.<anonymous>
(file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3459:116)
at tT0.B [as _actionHandler]
(file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:667:528)
at file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:671:3127
at tT0._chainOrCall
(file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:671:1694)
at tT0._parseCommand
(file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:671:3103)
at tT0.parseAsync
(file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:668:4195)
at dT8 (file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3489:1224)
at gT8 (file:///[user-path]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3446:10158)
Node.js v24.6.0
Additional Context
Affected directories (CLI crashes):
- Some project directories with existing .claude configuration folders
- Projects with permission settings in .claude/settings.local.json
- Approximately 3 out of 5 tested project directories show this issue
Working directories (CLI starts normally):
- Parent workspace directory
- Other project directories in the same workspace
- Newly created directories without existing configuration
Investigation findings:
- The error occurs in the Wq1() function at line 739 of cli.js, which contains:
for(let Q of B.allowedTools)
- where B.allowedTools is undefined instead of an array.
- The function expects B (returned from UQ()) to have an allowedTools property, but in certain directories this
property is missing.
- The SDK definition shows allowedTools should default to an empty array:
allowedTools = [], // from sdk.mjs line 105
- Attempted workarounds that didn't resolve the issue:
- Adding "allowedTools": [] to .claude/settings.local.json
- Removing .claude directories entirely
- Clearing parent directory configurations
- Note: claude --version works in all directories (only shows version), but claude (interactive mode) fails with
this error.
This appears to be a bug in the CLI's configuration initialization where the allowedTools property isn't being
properly initialized in certain project contexts.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗