What Is YOLO Mode in Reasonix? Configuration, CLI Usage, and Safety Boundaries
YOLO mode in Reasonix is a runtime tool-approval posture that auto-approves every ordinary tool call for the current session while preserving hard deny rules and model ask prompts.
YOLO mode (short for "You Only Live Once") is a feature in the esengine/DeepSeek-Reasonix agent framework designed to eliminate friction during automated workflows. This mode bypasses the standard ask/auto permission gates for side-effecting tools like file writers and Bash commands, allowing the model to execute operations uninterrupted while maintaining critical safety boundaries.
How YOLO Mode Works in Reasonix
The Decision Enum and Approval Postures
In internal/permission/decision.go, the Decision enum defines three approval postures: Ask, Auto, and Yolo. When a session enters YOLO mode, the controller logic in internal/control/controller.go (specifically around lines 1305-1306) checks requestApproval and short-circuits the normal flow, immediately returning approval for tool calls that would otherwise prompt the user.
Safety Boundaries in YOLO Mode
Despite its name, YOLO mode does not disable all safeguards. Hard deny rules still take precedence; a rule such as Bash(rm -rf*) remains blocked even when YOLO is active. Additionally, the mode does not answer model ask questions, does not approve plan-mode plan approvals, and does not skip MCP read-only trust prompts. These interactions still wait for explicit user confirmation.
How to Enable YOLO Mode in Reasonix
Command Line Activation
Use the --yolo flag (also available as --dangerously-skip-permissions) when starting a session. In internal/cli/cli.go (around line 535), this flag sets the session's AutoApproveTools state to true.
reasonix --yolo run "refactor all *.go files to use go 1.22 syntax"
Interactive Toggle Shortcuts
While the chat TUI is focused, press Ctrl+Y (Linux/Windows) or Cmd+Y (macOS) to toggle YOLO mode at runtime. The status line displays a red "YOLO" pill to confirm activation, as documented in docs/GUIDE.md.
Bot Slash Commands
In bot contexts, send /yolo or /mode yolo to activate the posture. The implementation in internal/bot/gateway.go (line 754) handles these commands, returning a confirmation message: "已开启 YOLO:普通工具审批将自动放行;Ask 问题和计划批准仍会等待确认。"
When to Use YOLO Mode in Reasonix
Trusted Automation Workflows
Enable YOLO mode when running scripts that require multiple file writes or Bash commands in a temporarily trusted environment. This eliminates repetitive approval prompts while retaining the safety net of deny rules.
Testing and Debugging
Use YOLO during agent development to exercise the full tool chain without manual intervention. This enables fast iteration; you can later re-run with normal approvals to verify safety.
Headless and CI Environments
For non-interactive sessions, the --yolo flag guarantees full-auto behavior for all tools without prompting. This is essential for automated pipelines that require the same permissions as interactive YOLO mode.
One-Off Supervised Tasks
Toggle YOLO on for specific refactoring operations you are actively supervising, then toggle it off to resume normal ask/auto behavior. This targeted approach balances velocity with oversight.
Implementation Details
The YOLO state persists in the session's AutoApproveTools field, managed in desktop/settings_app.go for the desktop client. Programmatically, you can check the current posture:
if sess.AutoApproveTools() { // true when YOLO is on
// tool calls will be auto-approved
}
This method reflects the current tool-approval posture as implemented in internal/control/controller.go.
Summary
- YOLO mode in Reasonix auto-approves ordinary tool calls while preserving hard
denyrules and modelaskprompts. - Activate via CLI flag (
--yolo), keyboard shortcut (Ctrl+Y/Cmd+Y), or bot command (/yolo). - The implementation centers on the
Decisionenum ininternal/permission/decision.goand the controller logic ininternal/control/controller.go. - Use YOLO for trusted automation, testing, CI pipelines, and supervised one-off tasks where manual approval creates friction.
- Hard
denyrules and model questions remain blocking even in YOLO mode, ensuring critical safety checks stay active.
Frequently Asked Questions
Does YOLO mode disable all safety checks in Reasonix?
No. While YOLO mode bypasses the standard ask/auto gates for ordinary tools, hard deny rules continue to block prohibited operations. Additionally, model ask questions, plan-mode approvals, and MCP read-only trust prompts still require explicit user confirmation.
How do I toggle YOLO mode during an active session?
Press Ctrl+Y (Linux/Windows) or Cmd+Y (macOS) while the chat TUI is focused. Alternatively, use the /yolo or /mode yolo slash commands in bot contexts. The status line will display a red "YOLO" indicator when active.
Can I use YOLO mode in headless or CI environments?
Yes. Start Reasonix with the --yolo or --dangerously-skip-permissions flag (defined in internal/cli/cli.go). This ensures the session enters YOLO mode immediately without requiring interactive input, making it suitable for automated pipelines.
What is the difference between YOLO and Auto mode in Reasonix?
Auto mode typically applies to specific pre-approved tools or contexts, while YOLO mode is a global session posture that auto-approves all ordinary tool calls regardless of their individual auto-approval status. YOLO is more aggressive and intended for scenarios where you trust the entire workflow, not just specific tools.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →