Flagship feature

Send with Goal

Instead of nudging the agent turn by turn, you declare a success criterion. An independent goal-agent supervises every turn and decides for itself: keep pushing the agent, or declare the goal achieved.

Self-iteratingSupervisedIteration-capped

How it works

The Send with Goal button sits next to Send in the chat composer. Clicking it opens a modal where you declare three things: the success criterion, the goal-agent that supervises, and the maximum number of iterations.

You send with a goal

Your composer text is forwarded to the target session, and an ACP goal-agent is spawned concurrently.

The target agent works

The agent runs its turn as usual — editing code, running commands, responding.

The goal-agent evaluates each turn

When the target turn ends, the backend hands the goal-agent a rendered prompt with context, then reads its decision.

Continue or complete

The response is parsed for an action directive. continue → forwarded as the next prompt to the target agent. complete → the goal transitions to achieved.

The goal-agent prompt template

On each evaluation, the backend renders a template with context placeholders and sends it to the goal-agent. The goal-agent replies with a structured action directive.

Template placeholders

PlaceholderDescription
{{goal}}The success criterion you declared
{{conversation}}Recent conversation context
{{iteration}}Current iteration number
{{maxIterations}}Maximum iteration cap

Action directives

typeDescriptionOutcome
continueAgent should keep going — text inside the action tagForwarded as the next prompt to the target agent
completeGoal is satisfiedState moves to achieved
The goal-agent is a separate agent

The goal-agent runs as its own ACP connection, separate from the working agent. It only observes and decides continue/complete — it does not edit your code directly.

The four termination paths

A Goal loop always ends in exactly one of four ways — there is no infinite loop:

Stop reasonDescription
Goal achievedThe goal-agent returns complete. State moves to achieved.
Iteration cap reachedTurns reach maxIterations without completing — the loop stops safely.
User presses StopYou can always stop manually at any time.
Parse-failure ×2 / agent exitsAction directive fails to parse twice in a row, or the goal-agent exits.

Tracking & recovery

Goal state shows through a chip on the target session, with a detail panel. Each goal record is persisted per target session in settings.json. On backend restart, active goals resume, capped at the 50 most recent records.

Write a good success criterion

The more verifiable your criterion, the more accurately the goal-agent decides. “All unit tests in the auth module pass” is far better than “make the login feel better”.