> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Devin Local Modes

> Switch the Devin Local agent in Devin Desktop between Code, Smart, Ask, Plan, and Bypass Permissions modes, and plan before implementing.

Devin Local sessions offer five modes. Each mode sets what the agent may do and how much it asks before acting.

| Mode | Use case | What the agent does |
| - | - | - |
| [Code](#code-mode) | Features, refactoring, fixes | Writes and edits code; auto-approves edits inside the workspace |
| [Smart](#smart-mode) | Fewer interruptions on routine work | Like Code, and a fast model auto-approves other actions it judges safe |
| [Ask](#ask-mode) | Learning, questions, exploration | Answers questions without code changes |
| [Plan](#plan-mode) | Complex features that need a plan first | Explores read-only and writes a plan for your approval |
| [Bypass Permissions](#bypass-permissions) | Unattended runs you fully trust | Auto-approves all tool calls unless your organization's policy requires approval |

Switch modes with the mode selector below the input box. Because Devin Local shares its agent harness with Devin CLI, the modes map onto the Devin CLI agent modes and [permission modes](https://docs.devin.ai/cli/reference/permissions.md); the slash commands listed in [essential commands](https://docs.devin.ai/cli/essential-commands.md#modes) also work in the Devin Local input.

Whatever the mode, your [permission rules](https://docs.devin.ai/desktop/devin-local/permissions.md) and any organization-enforced rules still apply. Deny and ask rules your admin enforces take priority even in Bypass Permissions.

## Code mode

**Code mode** is the default mode for making changes to your codebase.

In Code mode, the agent can:

* Create, edit, and delete files
* Run terminal commands
* Search and analyze your codebase
* Install dependencies
* Execute multi-step tasks autonomously

Edits inside the workspace are auto-approved. Shell commands, web fetches, and MCP tools prompt for approval unless an allow rule covers them. If your organization does not allow auto-approved edits, Code mode prompts for edits as well.

> [!TIP]
>
> We recommend Code mode as your default for most tasks.

## Smart mode

**Smart mode** keeps Code mode's auto-approved edits and adds a fast model that decides, for every other action, whether it is safe to run without asking. Anything it does not judge clearly safe still prompts, and high-risk categories (package installs, mutating `git`, `rm`, `sudo`, destructive cloud CLI operations, sensitive files) always prompt.

> [!NOTE]
>
> Smart mode is rolling out gradually, so it may not appear in your mode selector yet. See [Smart Mode](https://docs.devin.ai/cli/reference/permissions.md#smart-mode) for the full behavior.

## Ask mode

**Ask mode** is a read-only mode optimized for questions and exploration.

In Ask mode, the agent can search and analyze your codebase, but cannot make any changes.

## Plan mode

**Plan mode** helps you think through complex tasks by developing a detailed implementation plan before writing any code.

In Plan mode, the agent will:

* Explore your codebase to understand the current state
* Ask clarifying questions to ensure the plan aligns with your goals
* Provide multiple options for you to choose from with an interactive interface
* Present a detailed plan, written in an external Markdown file, with implementation steps

The plan file lives outside your repository and persists for the session, so planning can span several messages. When the agent is finished, it asks to start implementing — or you can click **Implement** on the plan file yourself to switch to Code mode and begin.

### Planning more deeply

Including the keyword `megaplan`, `ultraplan`, or `masterplan` anywhere in your message switches the conversation into Plan mode and makes the agent plan more extensively, asking at least one clarifying question before it writes the plan. The previous mode is restored once you remove the keyword.

### Continuing from a plan

The Markdown file created in Plan mode can be particularly useful for continuing work across multiple sessions.

Plans are stored in `~/.devin/plans/` and are available in the [@mentions](https://docs.devin.ai/desktop/chat/overview.md#%40-mentions) menu. By mentioning a plan file, you can continue implementation with a fresh context.

This can be particularly useful when an initial implementation went awry: discard the original changes, tweak the plan file, and click **Implement** to attempt implementation again in a new conversation.

### Exiting Plan mode

There are multiple ways to move from planning to implementation:

* Click the **Implement** button on the plan file
* Approve the agent's request to leave Plan mode once the plan is ready
* Change your mode to Code mode in the input box
* Let the agent *automatically* switch to Code mode when it detects that you're ready to implement

## Bypass Permissions

**Bypass Permissions** auto-approves all tool calls, including file writes and shell commands.

> [!WARNING]
>
> Use Bypass Permissions only for work you fully trust. It never overrides organization-level permissions configured by your admin: admin-enforced deny and ask rules always take priority.

## Sandboxed sessions

When [sandboxing](https://docs.devin.ai/desktop/devin-local/overview.md#sandboxing) is enabled, the session runs in **Autonomous** mode instead of the modes above: the OS-level sandbox contains what commands can touch, and you are prompted for capabilities (such as network access) rather than individual commands. See [Autonomous Mode](https://docs.devin.ai/cli/reference/permissions.md#autonomous-mode).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.