The Deska blog
Running Claude Code With Permissions Off, Less Dangerously
Learn strategies for running Claude Code with permissions off while maintaining security through sandbox layers and workspace isolation.
· 11 min read
Running Claude Code with permissions off is a tempting proposition for developers seeking maximum velocity. By bypassing the constant request for approval on every file edit or terminal command, you unlock a fluid experience where the agent iterates rapidly on complex refactors. However, this convenience introduces significant risks to your filesystem and environment. The goal is to establish a workflow that allows for high autonomy while keeping blast circles small.
The Tradeoff of Manual Approval
Standard operations for CLI agents involve a loop of proposal and consent. The agent suggests a change, and the user must press a key to authorize it. This ensures that a hallucinated rm -rf or an incorrect overwrite of a configuration file stays contained. When you disable these prompts, you are essentially trusting the LLM with direct write access to your environment.
While this speeds up development, it removes the human as a real time firewall. To mitigate this without going back to manual clicking, you must implement technical guardrails that sit between the agent and your sensitive data. This involves filesystem isolation, specific workspace configurations, and the use of tools designed to visualize concurrent processes.
Strategies for Sandboxing Agent Activity
If you intend to run in a permissive mode, the first line of defense is not the agent configuration itself, but the environment where it lives. You should never run an unpermissioned agent in a directory that has unrestricted access to your home folder or sensitive environment variables.
- Use containerized environments. Running your CLI agent inside a Docker container or a dedicated development container ensures that even a catastrophic failure remains trapped inside the virtualized filesystem.
- Initialize clean repositories. Before starting a high autonomy session, ensure your git state is clean. This allows you to perform a hard reset if the agent performs an unwanted cascading change across multiple files.
- Limit credential exposure. Remove
.envfiles or move them to a parent directory that the agent is not allowed to index. CLI agents can and will read these files if they are within the scope of the project.
Integrating Deska for Visual Oversight
When running autonomous agents, the biggest danger is losing track of what the agent is doing in the background. Deska provides a way to maintain situational awareness without interrupting the agent flow. By using an infinite canvas, you can arrange your workspace to monitor the agent from multiple angles simultaneously.
In Deska, you can place your agent terminal side by side with a live editor and a browser preview. This layout allows you to see the code being written in real time via the Monaco editor panel while the agent operates in the terminal panel. Because Deska is local-first, the interaction between the agent and your files happens on your machine, but the canvas gives you the high level visibility needed to spot errors before they propagate.
Using panels to separate concerns is a key safety tactic. You can have one terminal running the agent in yolo mode, while another terminal runs a filesystem watcher or a test suite. If the test suite starts failing, you can intervene through the Ask Deska interface or by manually stopping the process in the terminal panel.
Configuring Guardrails in Claude Code
Claude Code has specific flags and configuration files that dictate its behavior. While the --yolo or equivalent flags remove the interaction barrier, you can still define boundaries within the project structure.
A common approach is using a .claudecode ignore file or similar configuration to strictly forbid the agent from touching specific directories like .ssh, node_modules, or system configuration paths. By explicitly defining the scope of the project, you reduce the surface area for accidental damage. Furthermore, you should frequently use the git diff capability of the agent to summarize its own changes before you commit them to your main branch.
Monitoring from Mobile Devices
Sometimes the most dangerous part of running an autonomous agent is walking away from the computer while it completes a long task. If you are running a complex migration, you might want to step away but remain informed.
Deska offers a mobile app that allows you to monitor your workspace sessions through a secure relay. Because the devices pair directly without exposing ports, you can check the terminal output from your phone. If you see the agent entering a loop or making suspicious edits, you can use the remote access features to terminate the process or trigger a command to stop the execution. This adds a physical layer of safety to your remote development workflow.
Managing Multiple Agents Safely
Advanced workflows often involve using different tools for different tasks. You might use one agent for architectural planning and another for brute force refactoring. Running these agents side by side requires a workspace that can handle multiple concurrent sessions without cluttering your desktop.
Within a single workspace, you can run Claude Code, Codex CLI, and other tools as separate panels. This allows you to compare their outputs. If one agent is running with permissions off, you can use a second, more restricted agent to audit the code produced by the first. This "checker" pattern is a robust way to maintain quality while allowing for high speed automation.
FAQ on Autonomous CLI Agents
How to stop Claude Code from deleting files?
To prevent accidental deletions, you should always run the agent within a git repository and ensure your work is committed before starting a session. Additionally, you can use filesystem permissions to make specific critical files read only, which prevents the agent process from modifying them regardless of its own internal logic.
Is it safe to give AI agents terminal access?
Terminal access is inherently risky as it allows for arbitrary command execution. It is only relatively safe when used inside a restricted environment like a virtual machine, a container, or a dedicated workspace like Deska where you have clear visibility into the terminals and can terminate sessions instantly.
Can I run AI coding agents offline?
Most CLI agents require an internet connection to reach the LLM provider for inference. However, your files and local session data remain on your machine. Using a tool that prioritizes data and storage privacy ensures that your source code is not being stored on external servers beyond the immediate needs of the inference request.
Improving Your Workflow with Deska
Safely managing autonomous agents requires a balance of isolation and visibility. Tools that provide a clear view of your entire development environment make it much easier to trust these agents with more power. By leveraging a flexible workspace, you can keep your terminal, editor, and documentation in one view.
If you are looking for a way to organize your AI development tools and maintain control over your local environment, you can download the Deska desktop app for Mac, Windows or Linux. The free canvas provides the space you need to experiment with agent configurations while keeping your local files secure and accessible.