[DOCS] Inconsistent and potentially broken CLI argument syntax for `--tools` and `--disallowedTools` flags

Resolved 💬 4 comments Opened Jan 19, 2026 by coygeek Closed Feb 27, 2026

Documentation Type

Unclear/confusing documentation

Documentation Location

https://code.claude.com/docs/en/cli-reference

Section/Topic

The CLI flags table, specifically the entries for --allowedTools, --disallowedTools, and --tools.

Current Documentation

The table provides the following examples for these flags:

  • --tools: "Bash,Edit,Read"
  • --allowedTools: "Bash(git log:*)" "Bash(git diff:*)" "Read"
  • --disallowedTools: "Bash(git log:*)" "Bash(git diff:*)" "Edit"

What's Wrong or Missing?

The documentation implies two different, contradictory syntaxes for restricting tools:

  1. Comma-separated values (CSV): Shown in the --tools example.
  2. Space-separated quoted strings: Shown in the --allowedTools and --disallowedTools examples.

Technical Risk: In most shell environments (Bash, Zsh, etc.), the syntax "Bash(git log:*)" "Bash(git diff:*)" "Edit" following a single flag will fail. The shell will interpret the first quoted string as the value for the flag and the subsequent strings as separate positional arguments. This would likely result in Claude Code only processing the first tool and ignoring the rest, or failing with an "unexpected argument" error.

Suggested Improvement

Standardize all tool-restriction flags to use a single comma-separated string, or clarify if the flags must be passed multiple times.

Suggested Text for --disallowedTools example:
--disallowedTools "Bash(git log:*),Bash(git diff:*),Edit"

Suggested Text for --allowedTools example:
--allowedTools "Bash(git log:*),Bash(git diff:*),Read"

Impact

High - Prevents users from using a feature

Additional Context

  • Related Documentation: https://code.claude.com/docs/en/cli-reference
  • Severity: Major (Users following the current example for disallowed tools will likely fail to restrict the intended tools, creating a potential security or workflow issue).

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗