Hey everyone! I'm trying to get Claude Code running in YOLO mode, and I wanted to share a quick guide on how to do it safely. First off, you need to run an initial command in an interactive session to acknowledge the risks involved. Use `claude --dangerously-skip-permissions`, then select 'yes' and exit. Once you've done that, you're good to go! You can run the Claude Code with this command: `claude --continue --print "[YOUR PROMPT]" --dangerously-skip-permissions --verbose --output-format stream-json | jq`. The `--continue` option is for resuming previous sessions, and using `jq` is optional but could help format the output better. If you're curious about other output modes, just run `claude --help` for more info! I'm also working on a self-hosted webhook to manage tasks in Docker with Claude for autonomous long-term projects, and I'd love to get any feedback or suggestions on that! You can check it out at my GitHub repo. Thanks!
4 Answers
Just a heads-up—if we all go down thanks to Skynet, it might be on your head! 😂
What’s the difference between this and auto-accept? Doesn't auto-accept require some manual actions still? This setup can run entirely unattended, right?
Exactly! Auto-accept still needs some manual confirmations, whereas this method operates fully autonomously. If you’ve found a way to combine the two, I’d love to hear about it!
If you're using Claude Max, there's a way to keep it running after reaching the token limit. You can wrap your command in error handling that makes the system wait and try to restart. Alternatively, switching to an API token or Amazon Bedrock could also work. Just make sure to set unique environment variables so your next run of Claude Max keeps using the same auth.
Thanks for the tip! I might try that if I hit the token limit again. Appreciate the help!
The commands you mentioned are from the shell, not inside the app. The first one (`claude --dangerously-skip-permissions`) is just a one-time setup to accept running in risky mode—once you're past that, you won't need it again for future sessions. For the 'AllowedTools' issue, I found that even with permissive settings, some commands still require manual input, which interrupts automation.
Got it! That makes more sense now. Thanks for clarifying about the commands!
Haha, fair point! I guess we’re all in this together!