# Goals



<DocVideo src="features/modes/goal-run" alt="A goal working through a build failure and failing tests until the objective is met" width="1000" height="560" maxWidth="800" />

Goals are for work you want finished, not just started. Tell the agent what done looks like, and it keeps going on its own until it gets there.

## When to Use It [#when-to-use-it]

* **A good fit:** large tasks with a clear finish, like a feature with tests, a migration, or fixing a failing test suite.
* **Not a good fit:** questions, exploring ideas, or work you want to check step by step. Use a normal message for those.

## How It Works [#how-it-works]

1. The agent works on your objective without stopping to ask what's next.
2. Each time it finishes a turn, a review checks the work in the background. You won't see this in chat.
3. If the objective isn't met yet, the agent picks up what's missing and keeps going.

The goal ends when the objective is met, when the agent needs something only you can provide, or when you press **Stop**.

## Start a Goal [#start-a-goal]

<DocVideo src="features/modes/start-goal" alt="Picking /goal from the slash menu, typing an objective, and sending it while Ideavo starts working" width="1120" height="720" />

Type `/` and pick **goal**, write your objective, and send. Objectives can be up to 4,000 characters.

<Callout type="info">
  Start your goal in [**Build Mode**](/docs/features/build-mode) so the agent
  can make changes.
</Callout>

## Stop a Goal [#stop-a-goal]

Press **Stop** to end a goal at any time. The work done so far stays in your project. Goals can't be paused, so use `/goal` to start a new one when you're ready.

## Connect Your Sandbox Key [#connect-your-sandbox-key]

Goals can run for a long time, so they need your own sandbox key. Add an [E2B](/docs/features/e2b) or [Boat](/docs/features/boat) key before your first goal. If you haven't added one yet, Ideavo opens your sandbox settings when you try.

## Before You Start [#before-you-start]

The clearer the finish line, the better the result.

| Avoid                           | Why it doesn't work           | Try instead                                                                      |
| ------------------------------- | ----------------------------- | -------------------------------------------------------------------------------- |
| Add payments                    | Nothing says when it's done   | Add Stripe subscriptions with a pricing page. The build and all tests must pass. |
| Make the code cleaner           | It's a matter of taste        | Fix every lint error. `npm run lint` must pass.                                  |
| Build the whole app             | Too big, with no clear finish | Add email and password login. `npm test` must pass.                              |
| Should we use Stripe or Paddle? | It's a question, not a task   | Ask in [Plan Mode](/docs/features/plan-mode), then set a goal for the choice.    |

* **Say how to check it.** Name something the agent can run and show, such as a command that passes.
* **Say what shouldn't change.** For example, "don't edit the existing checkout flow".
* **Set up access first.** Connect any keys and integrations, so the goal doesn't stop to ask for them.

<Callout type="warn">
  Goals can run for a long time, and a long goal uses more of your model usage
  than a single message.
</Callout>

## FAQ [#faq]

<Accordions>
  <Accordion title="Why did my goal stop before it finished?">
    The agent may need something only you can provide, such as a decision or a
    key. A goal also ends after an error, after a few checks with no progress,
    after 50 continuations, or if the agent restarts.
  </Accordion>

  <Accordion title="Can I send a message during a goal?">
    Yes. The agent handles your message, then the goal continues. If you ask it
    to stop, the goal ends.
  </Accordion>

  <Accordion title="Does a goal cost extra?">
    No. There's no separate charge for goals. Each turn is billed like any other
    message, through your Ideavo plan or, if you've connected your own key or
    subscription, by your provider. A goal runs more turns, plus one short check
    after each, so it uses more than a single message.
  </Accordion>

  <Accordion title="Why did /goal send as a normal message?">
    It needs an objective after `/goal`. On its own, it's sent as a normal
    message.
  </Accordion>
</Accordions>
