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

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.

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.

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.

ModeUse it whenPermissionsPersistence and tracking
/goalYou want autonomous work to continue toward a tracked objectiveUnrestricted while activeConversation goal state, status/pause/resume, time/token usage, optional token budget, goal tools
/ralphYou want a lightweight one-off continuation loop with normal approvalsNormal approval flowIn-memory loop only; no goal state or token budget
/yolo-ralphYou need the old one-off unrestricted loop around a single promptUnrestrictedIn-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.

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.

/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.

Terminal window
/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:

Limit iterations
/ralph "Fix the failing tests" --max-iterations 100
Custom completion phrase
/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 implemented
and verified working. Any tests that were relevant have been run and
are passing. The implementation is clean and production-ready. I have
not taken any shortcuts or faked anything to meet these requirements.</promise>

/yolo-ralph combines the original Ralph loop with unrestricted permissions:

Terminal window
/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.