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

# Agent modes

> Choose Act, Plan, Debug, or Migration for implementation, planning, a hardware investigation, or a platform port.

A mode sets what Inlay can do in a chat. Pick the mode that fits the task, and switch when the task changes.

| Mode | Use it to | Edits files and uses hardware |
| - | - | - |
| **Act** | Implement, build, test, flash, monitor serial output, run hardware scripts, and take instrument measurements. | Yes |
| **Plan** | Study the code and hardware, then write a plan for you to review. | No. Writes only its plan, and project memory if you approve. |
| **Debug** | Investigate a fault, hang, or other failure with a debugger attached. | Yes |
| **Migration** | Plan a port to a new platform, then implement it after you approve. | Not until you approve the plan. |

In every mode, your [approval setting](/docs/core-concepts/approvals.md) decides when Inlay asks before an action.

## Switch modes

* In VS Code, open the mode menu at the bottom right of the chat input (tooltip **Choose mode**), then select **Act**, **Plan**, **Migration**, or **Debug**.
* Enter `/act`, `/plan`, `/debug`, or `/migration`.
* Press `Shift+Tab` to cycle through the available modes: **Act**, **Plan**, **Migration** (when available), then **Debug**.

Only the modes your project supports appear. Migration, for example, appears only when a migration is available.

In VS Code, the mode menu and `Shift+Tab` are unavailable while Inlay is working or waiting for your approval. Wait for the turn to finish, or stop it, to change modes.

Inlay can also suggest a switch. In Act mode, it may ask to move to Plan, Debug, or Migration when the task calls for it. Choose **Enter Plan Mode**, **Enter Debug Mode**, or **Enter Migration Mode** to switch, choose **Stay in Act mode** to continue, or type different instructions.

## Act: make and verify changes

Use Act for implementation, builds, tests, flashing, serial monitoring, [hardware scripts](/docs/debug-mode/hardware-scripts.md), and instrument measurements. Switch to Debug when you need Inlay to start a debug server and inspect a paused target.

```text theme={"theme":"css-variables"}
Add a timeout to the sensor read, run the driver tests, and build the firmware.
```

## Plan: review an approach before implementation

Use Plan when a change involves several modules, hardware choices, or unclear requirements.

In Plan mode, Inlay can read code, documentation, schematics, diagnostics, and serial output that's already been captured. It can ask you questions, search the web, load skills, send research to subagents, and save project memory. It can't run commands, edit project files, flash, or use instruments.

```text theme={"theme":"css-variables"}
Plan a DMA-based UART receiver. Check the MCU documentation, identify the files
that need to change, and include tests for overflow and partial frames.
```

Inlay saves the plan in `.inlay/plans/` and asks you to review it:

1. Check the affected files, assumptions, and verification steps.
2. To request changes, reply with what to change. In the terminal UI, choose **Request changes** (`C`) first.
3. To approve, choose how the implementation handles approvals. Inlay then switches to Act mode and starts the plan.

| Where | Approve and confirm actions | Approve and skip approvals |
| - | - | - |
| VS Code | Select **Manually**, then choose **Approve & Execute**. | Select **Automatically**, then choose **Approve & Execute**. |
| Terminal UI | **Approve** (`Y`) | **Approve, run automatically** (`A`) |

Approving manually sets the chat to **Manually approve**, or keeps **Always ask** if you use it. Approving automatically switches the chat to **Skip all approvals**.

In VS Code, choose **View Plan** to open the plan in an editor tab. You can edit it there before you approve. In the terminal UI, press `E` in the plan review to open the plan in the editor set by `$VISUAL` or `$EDITOR`.

## Debug: investigate a hardware failure

Use Debug for faults, hangs, register state, and other problems that need an attached debugger. Debug includes everything in Act. It adds managed debugging: Inlay can start a debug server for your probe and read registers, memory, and the call stack of a paused target.

```text theme={"theme":"css-variables"}
The board hard-faulted after the second SPI transfer. Attach without programming
or resetting it, inspect the fault registers and stack, and explain the evidence.
```

> [!WARNING]
>
> A normal debugger connection can program and reset the target. When the current fault or RAM state matters, ask for an attach-only session. See [GDB debugging](/docs/debug-mode/gdb.md#choose-programming-or-attachment).

When you send a message in Debug mode, Inlay checks the connected hardware first:

| Detected | What Inlay shows | Your options |
| - | - | - |
| A J-Link probe without the J-Link software | **J-Link Software Required** | Install the software from SEGGER, then choose **I've installed it, retry detection**. Or choose **Continue without J-Link** to go on without J-Link debugging. |
| A Nordic PPK2 without Inlay's support for it | **PPK2 support** | **Install PPK2 support now**, or **Continue without PPK2**. |
| A PicoScope without Inlay's support for it | **PicoScope support** | **Install PicoScope support now**, or **Continue without PicoScope**. |

In VS Code, entering Debug mode also adds a **Debug Output** tab to the Inlay Monitor.

Leaving Debug mode stops the debug servers Inlay started, unless another chat is still in Debug mode.

Work from evidence: start with existing output, form a hypothesis, run a focused experiment, and reproduce the original condition after the fix. For longer investigations, ask Inlay to keep the findings and scripts together in a [hardware case](/docs/debug-mode/hardware-scripts.md#keep-a-hardware-case).

## Migration: port to a new platform

Migration mode plans a port to a new platform, then implements it after you approve the plan. Until you approve, it works like Plan mode: Inlay only reads the project and writes the plan. After approval, Inlay implements the plan in Act mode.

Migration mode appears only when your project and Inlay build support a migration:

| Migration | When it appears | Guide |
| - | - | - |
| XMOS | In projects that target an XMOS board. Port a SigmaStudio DSP project or other firmware to that board. | [Migrate to XMOS](/docs/solutions/sigmastudio-to-xmos.md) |
| Infineon | Only in the Infineon customer build. Plan a migration between Infineon AURIX platforms. | [Migrate between Infineon platforms](/docs/supported-hardware/infineon.md#migrate-between-infineon-platforms) |

In an XMOS project, choosing **Migration** in VS Code, or running `/migration` on its own, opens **Migrate to XMOS**, where you pick the source design. To skip that step, enter `/migration` followed by the path to a SigmaStudio `.dspproj` file or a source folder.

## Modes and approvals

Modes decide which actions are available. [Approval settings](/docs/core-concepts/approvals.md) decide when Inlay asks before performing them. Switching to Act or Debug doesn't turn off confirmations. Approving a plan with **Automatically** selected does: it switches the chat to **Skip all approvals**.

Each chat has its own mode. A queued message keeps the mode that was selected when you sent it, so check queued messages before you change what the chat is doing.

Resuming a conversation restores its last mode. If that mode isn't available in the current project, Inlay uses Act.


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