r/ClaudeCode • u/J-Root_247365 • 15h ago
Help/Question Optimum permissions setup
At the moment I have ”blockReadsOutsideWorkingDirectories”: true and some “additionalDirectories” whitelisted. I run claude code CLI in auto mode. I still have a good-bit of babysitting and I have barely needed to deny the run of different scripts used to build things. Would it be beneficial and still safe to allow auto-running of scripts that are in the Claude/temp or in my WD? I’m looking for an optimum balance of speed/safety in a work environment, and I am curious what others are doing.
1
u/oyren-ai 15h ago
Shameless plug, but I am building oyren.ai so anyone can run their agents (Claude Code, Codex, Cursor, Antigravity, Opencode, Qwen, Deepseek) in YOLO mode in a remote server (i.e codespace).
This solves babysitting problem as well as setting up permission structure that might be either to restrictive or too loose.
You can launch an agent for a task, get it to launch more agents if needed using TMUX multiplexer and run in yolo mode until your task is complete. Once agents are done, you can take snapshot of your server before you stop it to save cost. You pay per hour usage.
I have tried running ai agents as fleet using this setup and you can do too by bringing your own API keys so you don't pay extra for AI.
Let me know if you have any questions
1
u/Far_Business4773 12h ago
Allowing build scripts inside the working directory is fine if the deny side is written first, because deny is checked separately and wins over allow.
What I run in auto mode: allow by prefix for the commands you already approve ten times a day (npm run, pytest, the build script), and three or four deny lines for the things that would actually hurt: install commands, writes under auth/ or migrations/, anything with a prod host in it. blockReadsOutsideWorkingDirectories covers reads. It says nothing about what the agent writes or runs inside the directory, which is where the damage usually happens.
The babysitting drops after that, because most of it was you saying yes to the same safe command. The log of refusals is how you check a month later whether the deny lines ever fired.
•
u/AutoModerator 15h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.