Skip to content

Long-running goals

A Goal lets Kodik keep working toward one durable objective after an individual response settles. The Goal belongs to its chat session and can schedule private continuation turns until the work completes, needs you, or reaches a limit.

Send /goal <objective>:

/goal Migrate the package parser and prove compatibility

Kodik starts immediately. The submitted objective remains in chat as a normal user-style message with a Goal badge. The private Goal prompt, continuation turns, built-in Goal tools, and lifecycle notices do not add extra chat rows.

Every non-empty value after /goal is treated as the objective itself and starts a Goal. Multi-line objectives keep their line breaks, code blocks, and indentation; session lists show a one-line preview.

For larger work, send bare /goal to open the authoring panel without starting a Goal. Enter one prose objective, optionally set a token budget, then select Start. Authoring does not call the model or enter the chat transcript; the Goal attaches to the current session only when you start it. Objective and token-budget edits stay in the form while background Goal status updates arrive, including when replacing an unfinished Goal. You can type as soon as the form opens; those edits also survive the new chat finishing its setup. Goal objectives can contain up to 32,768 Unicode characters, so a complete benchmark or implementation brief can stay in the Goal instead of being cut off at the former 4,000-character limit. An objective written entirely in Cyrillic can contain about 32,400 characters. Long objectives remain responsive while you enter and start them on macOS, including after Reload Window. Their complete text is preserved in the Goal and its chat message.

If an unfinished Goal already exists, a new /goal <objective> replaces it immediately — its objective and progress are discarded. Pause the current Goal instead if you may want to come back to it.

Goal panel expanded to show a completed objective and token usage

When you follow the latest reply, Kodik releases older transcript pages during long Goals. Scrolling back reads those messages from saved history again. Reading older messages keeps your place while the Goal continues, and Pause or objective edits still apply during a history refresh.

The Goal panel stays above the Todo and File Changes panels whenever a Goal exists. It shows:

  • the current status and objective;
  • elapsed active duration with seconds always shown (42s, 4m 5s, 1h 2m 5s), updated every second while Kodik pursues the Goal and frozen when it stops;
  • tokens used so far, shown against the budget when one is configured (for example 12,500 / 30,000 tokens);
  • the full blocker reason when one exists;
  • controls to pause, resume, edit, or clear the Goal.

When a Goal stops at its budget, the header also shows the counts (Goal unmet (32,140 / 30,000)), so you can see how much headroom a raised budget actually leaves.

While a Goal is active, its Target icon remains visible in the Goal panel, on the Goal’s session card in the sessions sidebar, and on its navbar tab.

An active Goal can continue in its owning session even when that chat is not selected. Generating the chat title in the background does not delay the next Goal turn. Before Kodik starts another Goal turn, higher-priority work wins: a user message, queued work, an approval, a question, or recovery from a failed turn.

Goal state and accounting survive conversation compaction and a workbench restart. An active restored Goal can continue automatically once its session is ready.

If Kodik quits or crashes right after a Goal starts its next step, that step is ended as interrupted on restart and the Goal continues with a single new step.

Goal continuations are Goal-owned in every chat mode. An ordinary user-authored Plan turn is not charged to the Goal.

If the model answers a continuation with nothing at all (no text and no tool call), Kodik asks again by itself for as long as that keeps happening, and the Goal stays active.

Use the controls in the Goal panel:

  • Pause stops automatic continuation without removing the Goal.
  • Resume makes a resumable Goal active again.
  • Edit changes the prose objective or optional token budget.
  • Clear removes the Goal from the session. If a Goal turn is still running, Clear pauses the Goal first, which lets that turn finish.

If saving an edit fails, the panel keeps the saved Goal and your editable draft. A disk I/O failure shows disk-saving guidance; retry the save after resolving the disk problem.

Using Stop while a Goal turn is running cancels that turn and pauses the Goal.

You can also pause while the first Goal turn is getting ready. The Goal stays attached and paused after a reload; its prepared turn does not start. If work has already started, Pause lets that turn finish and prevents automatic continuation.

Status What it means
Active Kodik continues when the chat is ready. Prompts, approvals, and questions take priority.
Paused Choose Resume to continue.
Blocked Work needs input or an external change. Read the reason in the Goal panel, resolve it, then choose Resume. A genuine blocker can stop the Goal on its first turn.
Usage limited The provider or account limit interrupted the Goal. Resume after usage becomes available.
Budget limited The Goal reached its optional token budget. Increase the budget before continuing.
Complete The agent reported its objective achieved. Check its result and verification in the conversation.

An optional Goal budget counts fresh input and output tokens, including cache writes and usage by sub-agents launched by the Goal. Cache reads are excluded. A tool turn that crosses the budget can get a final chance to wrap up. The panel keeps accumulated usage after reopening the chat.

Goal controls operate inside the chat. The model’s get_goal and update_goal calls are hidden from the transcript and have no separate switches in Harness.