---
title: Goal mode (autonomous work) | Letta Docs
description: Use /goal for persistent autonomous work
---

Goal mode is experimental. It currently runs with unrestricted tool permissions while active, so only use it in environments where you are comfortable with the agent continuing work without repeated approval prompts.

Use `/goal` when you want Letta Code to keep working toward a concrete objective without having to repeatedly say “continue.” Goal mode is the recommended autonomous workflow for long-running tasks because it adds persistent conversation state, status commands, token/time tracking, and goal lifecycle tools.

Terminal window

```
/goal --token-budget 50000 finish the migration and open a PR
```

A goal is saved on the current conversation. While active, Letta Code reminds the agent of the objective each turn and automatically continues the work until the goal is completed, paused, cleared, disabled, or budget-limited.

## Why use `/goal`?

Goal mode turns autonomous work into explicit conversation state instead of a one-off loop around a prompt.

While a goal is active, Letta Code:

- Stores the objective on the current conversation
- Automatically queues continuation prompts after turns finish
- Runs the continuation loop with unrestricted tool permissions
- Tracks active time and token usage, including an optional token budget
- Gives the agent goal lifecycle tools to inspect, create, and mark goals complete
- Prompts the agent to audit real evidence before marking the goal complete

That makes `/goal` the best default for autonomous coding work like fixing a test suite, completing a migration, preparing a PR, or driving a multi-step refactor to completion.

## Starting a goal

Start with a concise, verifiable objective:

Terminal window

```
/goal improve benchmark coverage
```

Add a token budget when you want the loop to stop before spending too much context or provider budget:

Terminal window

```
/goal --token-budget 50000 improve benchmark coverage and summarize remaining gaps
```

If a conversation already has a goal, replace it explicitly:

Terminal window

```
/goal --replace finish the docs migration and open a PR
```

## Managing a goal

| Command                                  | Description                                                 |
| ---------------------------------------- | ----------------------------------------------------------- |
| `/goal` or `/goal status`                | Show the current goal and usage                             |
| `/goal --token-budget 50000 <objective>` | Set a goal with a token budget                              |
| `/goal --replace <objective>`            | Replace the current goal                                    |
| `/goal pause`                            | Pause automatic continuation                                |
| `/goal resume`                           | Resume a paused goal                                        |
| `/goal complete`                         | Manually mark the goal complete                             |
| `/goal clear`                            | Remove the goal                                             |
| `/goal disable`                          | Remove the goal and disable goal tools for the conversation |

You can also press **Shift+Tab** during an active goal loop to exit the autonomous loop. Letta Code pauses the goal so you can inspect progress, give feedback, or resume later.

## Completion behavior

Before the agent marks a goal complete, Goal mode prompts it to perform a completion audit against real evidence. The agent is told to map the objective to concrete deliverables and verify them against files, command output, tests, PR state, or other current artifacts.

The goal should only be marked complete when the audit shows that the objective has actually been achieved.

## Writing good goals

Goal mode works best with clear, verifiable completion criteria.

**Works well:**

```
/goal Fix the failing auth tests. Requirements:
- Reproduce the current failures
- Implement the smallest safe fix
- Run the affected tests
- Summarize what changed and any remaining risk
```

The agent can verify each requirement before marking the goal complete.

**Works poorly:**

```
/goal Make the code better.
```

Without concrete criteria, the agent may spend budget indefinitely or stop with weak evidence.
