$ recombobulate _
home / tips / restrict-tool-access-with-allowedtools
0

Restrict Tool Access with --allowedTools

bagwaa @bagwaa · Mar 25, 2026 · Configuration
restrict-tool-access-with-allowedtools

By default, Claude Code has access to a wide range of tools. When running automated tasks or scoped jobs, you can limit it to exactly the tools it needs.

claude --allowedTools "Read,Grep,Glob" \
  "Find all TODO comments in this codebase and summarise them"

The --allowedTools flag accepts a comma-separated list of tool names. This is useful for CI workflows where you want Claude to analyse code but never write or execute anything, or for any situation where you want to reduce the blast radius of an automated run.

# Read-only audit — Claude can look but not touch
claude --allowedTools "Read,Grep,Glob,WebFetch" \
  "Audit our npm dependencies for known vulnerabilities"

If you'd prefer to whitelist everything except a few specific tools, use the inverse:

# Allow everything except shell execution
claude --disallowedTools "Bash" \
  "Refactor the auth module"

This pattern is especially useful when you're piping Claude into scripts or sharing access with team members who should have read-only Claude sessions.

Constraining Claude's tools makes automation more predictable and your environment more secure.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago