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.
/goal --token-budget 50000 finish the migration and open a PRA 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?
Section titled “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
Section titled “Starting a goal”Start with a concise, verifiable objective:
/goal improve benchmark coverageAdd a token budget when you want the loop to stop before spending too much context or provider budget:
/goal --token-budget 50000 improve benchmark coverage and summarize remaining gapsIf a conversation already has a goal, replace it explicitly:
/goal --replace finish the docs migration and open a PRManaging a goal
Section titled “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
Section titled “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
Section titled “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 riskThe 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.