Skip to content
Letta Code Letta Code Letta Docs
Sign up
Reference

Goal mode (autonomous work)

Use /goal for persistent autonomous work

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.

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.

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
CommandDescription
/goal or /goal statusShow 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 pausePause automatic continuation
/goal resumeResume a paused goal
/goal completeManually mark the goal complete
/goal clearRemove the goal
/goal disableRemove 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.

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.

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.