Goal

The /goal command sets a completion condition, and Hawa Code keeps working toward it without requiring step-by-step prompting from you. After each conversation round ends, a lightweight fast model checks whether the condition is met. If not, Hawa Code automatically starts the next round instead of returning control to you. Once the condition is satisfied, the goal is automatically cleared.

Use a goal for substantial work with a clearly verifiable end state:

  • Migrate a module to a new API until all call sites compile and tests pass
  • Implement a design document until all acceptance criteria are met
  • Split a large file into focused modules until each module is within size limits
  • Process a labeled todo list until the queue is empty

Comparison of Session Continuation Methods

There are three ways to keep the current session running between prompts. Choose based on what should trigger the next round:

Method When the next round starts When it stops
/goal After the previous round ends When the model confirms the condition is met
/loop When the time interval elapses When you manually stop it, or when Hawa Code determines the work is complete
Stop hook After the previous round ends When your own script or prompt decides

Both /goal and Stop hooks trigger after each round ends. /goal is a session-level shortcut: you enter a condition and it only applies to the current session. Stop hooks are saved in the settings file and apply to every session within their scope; they can run scripts for deterministic checks or use prompts for model evaluation.

/auto model itself only automatically approves tool calls within a single conversation round; it does not start a new round. Hawa Code stops when it judges the work is complete. /goal adds an independent evaluator that checks your condition after each round, so the completion judgment is made by a separate model rather than the one doing the work. The two are complementary: auto mode eliminates per-tool prompts, while /goal eliminates per-round prompts.

Using /goal

Only one active goal can exist per session. The same command can set, view, or clear the goal depending on the arguments.

Setting a goal

Run /goal followed by the condition you want satisfied. If an active goal already exists, the new condition will replace it.

/goal Fix all errors in the current project; every error message must be fully resolved

Setting a goal immediately starts a conversation round, with the condition itself as the instruction. You do not need to send a separate prompt.

When a goal is active, a ◎ /goal active indicator is displayed, showing how long the goal has been running.

After each round ends, the evaluator returns a brief rationale explaining whether the condition has been met. The latest rationale is shown in the status view and conversation log, so you can see what Hawa Code is currently working toward.

Viewing status

Run /goal without arguments to view the current status.

/goal

If a goal is active, the status shows:

  • The condition content
  • Elapsed running time
  • Number of evaluated rounds
  • Current token consumption
  • The evaluator’s latest rationale

If no goal is active but a goal was previously achieved in this session, the status shows the specific achieved condition, along with its duration, round count, and token consumption.

Clearing a goal

Run /goal clear to remove an active goal before the condition is met.

/goal clear

Running /clear to start a new conversation will also remove any active goal.

Resuming an active goal

When a session ends with an active goal still in place, using --resume or restoring that session will restore the goal. The condition is preserved, but the round count, timer, and token consumption baseline are reset upon resumption. Goals that have already been achieved or cleared will not be restored.

Use Ctrl+C to interrupt the process and stop a non-interactive goal before the condition is met.

How the Evaluation Mechanism Works

/goal is a wrapper around a conversation-level prompt-based Stop hook. After each round of Hawa Code completes, the condition content and the conversation history so far are sent to your configured lightweight fast model. The model returns a yes/no decision and a brief rationale. “No” means Hawa Code needs to continue working, and the rationale is used as guidance for the next round; “yes” clears the goal and records an achieved entry in the conversation log.

The evaluator runs on the provider configured for your session. It does not call tools, so it can only judge what Hawa Code has already presented in the conversation.