Skip to main content
A goal is a single objective that o4 keeps in front of the model. While a goal is active, o4 reminds the model of the objective and asks it to keep going instead of stopping at analysis or a partial fix. Use a goal for a larger job that takes several turns, such as “get the test suite passing” or “migrate the config loader to the new format”.

Start a goal

Type /goal followed by the objective:
o4 sets the goal and starts a turn right away with instructions to work on it. The second row below the prompt box shows Pursuing goal on the right, with the time since you set the goal, for example Pursuing goal (12m). There’s one goal per session. Starting a new goal replaces the current one.

Check, complete, or clear a goal

When a goal is complete, the same place shows Goal achieved and how long it took. o4 stops sending goal reminders. A goal that ran out of budget shows no label there; use /goal to see its status. Every /goal command runs right away, even while the model is working. A goal you start during a turn is set at once, and its first prompt goes out when the current turn finishes. If you clear or complete the goal before then, that prompt doesn’t go out.

How a goal keeps the model working

While a goal is active, o4 adds a goal reminder, hidden from the chat, in front of each message you send. The reminder restates the objective, shows the time and tokens used so far, and asks the model to:
  • keep working toward the full objective instead of a smaller version of it,
  • check the current state of the code instead of assuming its changes worked,
  • note what it finished, what’s left, and whether it’s blocked,
  • prove the goal is done with evidence before it marks the goal complete.
When a turn ends and the goal is still active, o4 also sends the reminder on its own as a continuation, so the model keeps going without waiting for you. o4 sends one continuation after each of your messages. If the model stops again after that turn, it waits for you. o4 skips the continuation if you’ve started typing, queued another message, or cancelled the turn.

How the model finishes a goal

The model has three goal tools. They run without asking for approval. To mark a goal complete, the model has to pass evidence: a list of requirements from the objective, each paired with what it observed, such as tests that passed or files it changed. A call without evidence fails. /goal complete doesn’t need evidence. update_goal also offers a blocked status, but in o4 0.2.74 that call always fails, so a stuck model can’t mark its goal blocked. If the model says it’s blocked, clear the goal with /goal clear or give it what it needs. A goal stays active until the model or you mark it complete, you clear it, or it reaches its token budget. The goal tools are blocked in plan mode.

Token budgets

A goal can have a token budget, which is a limit on how many tokens the model spends on it. /goal doesn’t set a budget. The model sets one when it calls create_goal with token_budget, so ask for it in your prompt if you want one:
After each model response, o4 adds the total token count the provider reported for that request to the goal. That total includes the input, which is the whole conversation, so it’s counted again on every request. A budget runs out much faster than the model’s output alone would suggest. When the total reaches the budget, the goal becomes budget limited and o4 stops sending continuations. From then on, with every message you send, o4 asks the model to summarize what it finished, list what remains, make sure its work is saved, and suggest how to continue in a new session. This continues until you run /goal clear or /goal complete, or start a new goal. Without a budget, a goal has no token limit.

Goals across sessions

The goal is saved with the session. When you resume the session with o4 resume, the goal comes back with its status, time used, and tokens used. For more on resuming, see sessions.