YOLO mode / store whitelisted commands
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Mar 11, 2025 · closed Mar 14, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
This is an awesome tool!
However, I miss YOLO mode.
When I have confirmed that it is OK to run a command it should be whitelisted so I do not have to confirm in another session again and again.
To be able to add some claude-code rules and yolo mode configuration to keep some context and configuration between sessions would be awesome.
10 Comments
Dear Anthropic, I hereby grant Claude unfettered dominion over my life—no more safety confirmations, no more hand-holding. Release the kraken!
Hey! There's a few ways to do that-
allowedToolsto your project config (docs)claude --allowedTools ...claude --dangerously-skip-permissionsflagWe're working on giving Claude more autonomy with less permission prompts, while at the same time making sure Claude can't bork your system, exfiltrate your data, etc. Hang tight and hope the tools above help in the meantime!
Does anyone have any good examples of allowedTools they've granted? Would be nice to see a good example file of some common ones
There's a whole host of read-only command line tools that CC doesn't even ask me to blanket-allow. Items like cat and ls are obvious ones, or grep. I would love if it CC understood pipes and redirections better, and could detect things that write and ask based on that, or worst case consider ls/cat/grep/awk/sed to be fine, as long as they don't pipe to another non-allowlisted command or redirect stdout to a file.
The way CC works now, I've sometimes thought about having a Haiku-based AI to act on my behalf with CC, pressing Enter or typing "please continue" when it's obviously time for that.
Here's my allowedTools from a dotnetcore conversion project I have running:
"allowedTools": [
"Bash(./build.sh --verbose)",
"Bash(./build.sh)",
"Bash(./build.sh:*)",
"Bash(./clean.sh)",
"Bash(./generate-html-report.sh)",
"Bash(./generate-models.sh:*)",
"Bash(./list-tables.sh)",
"Bash(./run-build.sh --core-only)",
"Bash(./run-build.sh)",
"Bash(./run-build.sh:*)",
"Bash(./run-generate.sh:*)",
"Bash(./run-linter.sh:*)",
"Bash(./run-netcore-tests.sh)",
"Bash(./run-tests.sh)",
"Bash(./run-tests.sh:*)",
"Bash(./run-web.sh)",
"Bash(./run.sh:*)",
"Bash(./test-cross-platform.sh)",
"Bash(awk:*)",
"Bash(bash:*)",
"Bash(brew install:*)",
"Bash(cd:*)",
"Bash(chmod:*)",
"Bash(cp:*)",
"Bash(dotnet --list-sdks)",
"Bash(dotnet add:*)",
"Bash(dotnet build)",
"Bash(dotnet build:*)",
"Bash(dotnet run)",
"Bash(dotnet svcutil:*)",
"Bash(dotnet test)",
"Bash(dotnet test:*)",
"Bash(dotnet tool install:*)",
"Bash(dotnet tool list:*)",
"Bash(dotnet-svcutil:*)",
"Bash(export:*)",
"Bash(find:*)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(grep:*)",
"Bash(ls:*)",
"Bash(mkdir:*)",
"Bash(perl:*)",
"Bash(sed:*)",
"Bash(touch:*)",
"mcp__playwright__browser_install",
"mcp__playwright__browser_navigate",
"mcp__web-search__brave_web_search"
],
Here's an example of a strange choice. It won't even allow me to add it to the allowlist. It's readonly, purely. My take is it should just do it, don't ask, and it's taking the opposite stance.
│ Bash command │
│ │
│ hexdump -C Model/Editable/EventBus.cs | head -50 │
│ Examining binary content of EventBus.cs │
│ │
│ Do you want to proceed? │
│ ❯ 1. Yes │
│ 2. No, and tell Claude what to do differently (esc) │
I'm using Claude Code v0.2.115. It continually asks me for permission to
Search():Read file
Search(pattern: "**/Xtento/OrderExport/Model/Export.php")
Do you want to proceed?
❯ 1. Yes
Even though I have the following (shortened for brevity) in my ~/.claude/settings.json file:
{
"permissions": {
"allow": [
"Search(*)",
"Search(pattern:*)",
"Search(pattern:, include:)",
"Read(*)",
"Edit(*)",
"Write(*)"
]
}
}
Does anyone know how to allow Claude to search without continually asking?
@bcherny
Even in the safe docker container I'm getting an error when running it for the first time
--dangerously-skip-permissions must be accepted in an interactive session first.I need to be able to run this programatically in Docker, so I can't accept it in an interactive session first. Is there a walkaround solution to this?
It would be great if Anthropic could relase a full example with all settings.
Its confusing what all the files are doing settings.json, settings.local.json, claude.json etc
For what it's worth, I solved the issue from my previous comment on this issue: Claude Code stopped continually asking me for permission to Search() after I removed
Edit(*)from my~/.claude/settings.jsonfile.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.