Goal mode (autonomous work)
Use /goal for persistent autonomous work, with Ralph and yolo-Ralph as lower-level alternatives
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. It supersedes /yolo-ralph for most use cases by adding 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.
This is stricter than the older Ralph completion-promise check. The goal should only be marked complete when the audit shows that the objective has actually been achieved.
Goal mode vs Ralph and yolo-Ralph
Section titled “Goal mode vs Ralph and yolo-Ralph”| Mode | Use it when | Permissions | Persistence and tracking |
|---|---|---|---|
/goal | You want autonomous work to continue toward a tracked objective | Unrestricted while active | Conversation goal state, status/pause/resume, time/token usage, optional token budget, goal tools |
/ralph | You want a lightweight one-off continuation loop with normal approvals | Normal approval flow | In-memory loop only; no goal state or token budget |
/yolo-ralph | You need the old one-off unrestricted loop around a single prompt | Unrestricted | In-memory loop only; no goal state or token budget |
In practice, use /goal for most long-running autonomous work. Use /ralph only when you want a temporary loop that keeps the normal approval flow. Use /yolo-ralph only when you specifically want the old throwaway unrestricted loop and do not need goal tracking.
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.
Lower-level alternative: /ralph
Section titled “Lower-level alternative: /ralph”/ralph starts the original Ralph Wiggum continuation loop. It repeatedly prompts the agent to continue until it outputs a specific completion promise, reaches a max-iteration limit, or you exit the loop.
/ralph "Build a REST API for todos with full test coverage"Ralph mode is useful when you want a one-off loop but still want normal tool approvals. It does not store an objective on the conversation, does not expose /goal status, and does not track token budgets.
Options include:
/ralph "Fix the failing tests" --max-iterations 100/ralph "Implement auth" --completion-promise "AUTH COMPLETE"By default, the agent must output this exact promise to stop the loop:
<promise>The task is complete. All requirements have been implementedand verified working. Any tests that were relevant have been run andare passing. The implementation is clean and production-ready. I havenot taken any shortcuts or faked anything to meet these requirements.</promise>Legacy autonomous loop: /yolo-ralph
Section titled “Legacy autonomous loop: /yolo-ralph”/yolo-ralph combines the original Ralph loop with unrestricted permissions:
/yolo-ralph "Refactor the auth module and update all tests"This is the older low-level autonomous workflow. Prefer /goal for most new work because it adds persistent objective state, pause/resume commands, token/time tracking, and a stronger completion audit. Keep /yolo-ralph for throwaway loops where you explicitly do not want goal state.