← Blog
ANNOUNCEMENT

Introducing /goal: The first step toward autonomous loops

Set one objective and walk away. /goal lets Command Code work toward a goal across many turns, and only calls it done after an independent check verifies it from real evidence.

Vipul Gupta
Vipul Gupta
3 min read
Jul 1, 2026

Most agentic coding happens one turn at a time. You ask, it answers, you ask again. For real end-to-end work, agents need a moderator: "keep going, continue", "did you actually run the tests?", "that's still not done."

We're shipping the fix — our first step toward the autonomous loop.

/goal gives Command Code a standing objective to work toward across many turns, instead of a single request. You set it once, and the agent keeps working (running commands, editing files, checking its output) until the objective is genuinely met by an independent check. Then, and only then, does it stop.

Set it once, walk away

Give it the kind of work you'd normally drive by hand:

  • /goal get the entire test suite passing
  • /goal migrate this module to the new API
  • /goal remove all unused exports in the source
  • /goal ship the release

Want to check in? /goal status shows where things stand. Changed your mind? /goal clear stops it. The point is that you're handing over an outcome, not narrating every step to get there.

The part that matters: How to prove it's done?

Here's the difference between /goal and an agent that just runs in a loop.

An agent can always say it finished. "I've fixed all the failing tests!" Except it never ran them. /goal doesn't take the agent's word for it. When it believes the objective is complete, it has to state its evidence: the files it changed, the commands it ran, the tests that passed. Then a separate, independent check runs and checks the evidence provided and decides whether the goal is actually satisfied.

If the claim is partial or unproven, it gets rejected, and the agent goes back to close the specific gap instead of declaring victory. So "done" means done, verified by something other than the agent that did the work.

This one design choice removes the two most annoying failure modes of autonomous agents: the false finish, and the agent that burns turn after turn re-doing work it already completed because nothing was tracking the actual goal.

Built so it can't run away

Autonomy without limits is how you wake up to a drained credit balance. /goal runs on a turn budget, 100 by default, up to 500 turns max if you raise it at launch using --max-turns.

If it hits the budget before finishing, it pauses and tells you, rather than stopping silently or spinning forever using up your credits. You decide whether to stop here or start a new, more defined /goal.

/goal collaborates with you. Queued messages will steer /goal, so if the agent needs to ask you something, it stops, asks, and your reply keeps it going, no re-typing anything. It never quietly resumes on its own after an error; it will try its best to get an honest status.

Flip on auto-accept using shift + tab shortcut key and it'll run unattended. The feature works with the images you paste, files you provide, or lines selected in your IDE using /ide, so "refactor this" means the thing you're actually looking at.

Try it out

1npm i -g command-code

Sign up for Command Code. Install it, /goal is live in Command Code. Give it an objective, and watch it work the problem instead of you.

Read /goal docs · Join Discord

Vipul Gupta
Vipul Gupta@vipulgupta2048

Share this article