---
title: Access modes
description: Choose how much Ysra may do on its own in a Code thread — Auto, Asks first or Read only — and when to turn on Plan first. Works the same in the web app, the desktop app, the CLI and VS Code.
---

Every Code thread has an **access mode** that sets how much Ysra may do
without asking you. Pick it when you start the thread, and change it at any
time from the **Access** chip under the message box. This page explains each
mode, what always asks regardless, and how to choose.

## The three modes

| Mode | What Ysra does | Use it for |
|---|---|---|
| **Auto** | Works through without asking: edits files, runs commands, commits on your branch. Still asks before the few things in [What always asks](#what-always-asks). | Projects you trust, when you want the work done while you do something else. |
| **Asks first** | Asks once per thread before it runs commands that reach outside the folder or change git, on the **commands card**. After **Allow for this thread**, they run for the rest of the thread. | New projects, unfamiliar code, and anything you want to keep an eye on. This is the default. |
| **Read only** | Reads and explains. Changes nothing: no edits, no commands that change anything, no installs. | Exploring code you don't know, reviews, and questions. |

### The commands card

In **Asks first**, the first command that reaches outside the folder (the
internet, another machine, your git remote) or changes the repository's git
history shows a card: “May I run `…`? It reaches outside this folder or
changes its git history. Allowing it lasts only for this thread.”

| Answer | What happens |
|---|---|
| **Allow for this thread** | That command runs, and so do others like it for the rest of the thread. |
| **Not now** | Ysra doesn't run them and carries on without them. |

The card is asked once per thread, not once per command.

The last mode you chose becomes the default for your next thread.

## Plan first

**Plan first** is a separate switch in the same menu. With it on, Ysra
writes a plan and waits for you to approve it before it changes anything.
The chip then reads, for example, **Asks first · Plan first**.

The plan card offers **Approve & build**. Once you approve, Ysra works in the
thread's access mode.

Use Plan first for large or risky changes, or when you want to agree on the
approach before any code moves.

## What always asks

No mode, not even **Auto**, lets Ysra do these without you:

- install software on the system itself;
- delete or overwrite files or work it didn't make;
- run destructive git, such as throwing away uncommitted changes or deleting a branch;
- push to the default branch, or force-push (Ysra never force-pushes);
- deploy or publish;
- send a message, an email or a change to another service;
- change anything on a machine or device;
- sign in to anything.

Each one shows the exact command or content before it runs. See
[Security](../security.md#what-always-asks-you-first).

## git on your computer

When the thread works on a folder on your computer, Ysra commits and makes
branches with its own git tool, never with a raw `git` command.

| Ysra wants to | **Auto** | **Asks first** | **Read only** |
|---|---|---|---|
| Commit on a branch it made in this thread | Commits | Commits | Never |
| Commit on your current branch, when it isn't the default branch | Commits | Asks once per branch in the thread | Never |
| Commit on the default branch (`main`, `master`) | Asks: “Commit on main? Or I can make a branch first.” | Asks the same | Never |
| Make a branch | Makes it | Asks once per thread | Never |
| Push a branch it made | Pushes | Asks once per thread | Never |
| Push to the default branch | Asks every time | Asks every time | Never |

Every commit is a new commit on top: Ysra never amends, rebases or rewrites
commits it didn't make. In Ysra's cloud, git is handled by delivery instead:
see [Commit and push](../desktop/commit-push.md).

## Change the mode

| Where | How |
|---|---|
| Web and desktop app | Choose the **Access** chip under the message box, then **Auto**, **Asks first** or **Read only**. The **Plan first** switch is in the same menu. |
| VS Code and Cursor | The access chip under the message box. Set the default for new threads with **Ysra: Approval Mode** in Settings. See [VS Code and Cursor](../install/vscode.md#settings). |
| CLI, interactive | `/auto on` or `/auto off` in the conversation. |
| CLI, scripts | `ysra exec --approval ask`, `auto` or `read-only`. See [Run Ysra from a script](../cli/headless.md). |

A change applies from your next message. If the switch can't be made, the
thread says so, for example “Couldn't switch to Read only.”, and keeps the
previous mode.

!!! note "Workspace rules come first"
    Your workspace's [autonomy policy](../workspace/autonomy-policy.md) can
    turn some actions off or make them always ask. An access mode never
    allows more than the policy does.

## On Windows

Commands on Windows itself aren't contained to the folder the way they are
on macOS and Linux, so there Ysra asks before each command that isn't a safe
read. Running commands inside WSL gives you the same behaviour as on Linux.
See [Ysra on Windows](../desktop/windows.md).

## Related

- [Security](../security.md) — what Ysra protects on your computer and in the cloud.
- [How a Code thread works](../developer/how-a-thread-works.md) — the states a task goes through.
- [Approvals and auto mode](../desktop/approvals.md) — the approval cards in the desktop app.
- [Autonomy policy](../workspace/autonomy-policy.md) — workspace rules for every thread.
