---
title: Sessions & Modes
description: "Choose how much autonomy the AI coding agent gets: Default asks before every edit, Auto-Accept keeps trusted work moving, and Plan mode stays read-only."
---

# Sessions & Modes

## Start a session

Run `ai` inside a repository to start an interactive chat session:

```bash
# start an interactive session in the current repo
ai

# start with your first request already typed
ai "add validation to the signup handler"
```

The agent works against the repo in your current directory and keeps the full
conversation in the live session as you go.

## Modes

A session runs in one of three modes. The mode controls how the agent asks for
approval and which tools it can use.

| Mode | Behavior |
|------|----------|
| **Default** | Asks before running shell commands and applying file edits. |
| **Auto-Accept** | Approves shell commands and file edits for the session. |
| **Plan** | Read-only. The agent can inspect, ask typed questions, and plan, with file-reading shell commands only. It will not edit files or run tests, builds, diagnostics, package managers, project code, or network probes. |

### Start in Auto-Accept mode

```bash
ai -y
```

The `-y` / `--yes` flag starts the session in Auto-Accept mode, approving every
shell command and file edit for the whole session.

::tip
Inside the session, press **Shift+Tab** to cycle between Default, Auto-Accept,
and Plan mode at any time. Mode is session-local and resumes in Default mode.
::

::tip
Use Plan mode when you want the agent to investigate and propose an approach
without touching anything. Switch to Default or Auto-Accept when you're ready
to let it make changes.
::
