Best practices

A /goal Is a Condition, Not a Sitting

A circulating skill brief treats /goal as one binary outcome you ship in one sitting, about 20 turns, with you in the chat the whole way. Same primitive, three products. That is the wrong shape.

/goal is a completion condition plus a judge that decides whether to start another turn. Claude Code, Codex, and Hermes Agent each built that loop. The commands look alike. The stop rules do not.

Star counts measure attention, not correctness. A skill file that collapses three docs into one ritual will burn the session it was meant to save. We checked the implementation details directly against the official docs on September 30, 2026.

Autonomous Goal Execution Loop architecture comparing Claude Code, OpenAI Codex, and Hermes Agent
Autonomous Goal Execution Loop: matching directive conditions to evaluator models and termination gates.

What the command actually does

You type /goal and a condition. That message is the directive. You do not send a second prompt. The first turn starts immediately.

After the turn, a separate small model reads what the agent has already said and returns a verdict. Not met: another turn starts, and the reason rides along as guidance. Met: the goal clears. Impossible, or blocked: the goal clears or pauses, and you get the reason.

The judge does not run your tests. It cannot see a file you did not surface. If the agent never prints the check, the judge is guessing from prose.

That is why Anthropic best-practices documentation puts /goal next to a check you can run: tests, a build exit code, a lint step, a screenshot compared to a fixture. "Looks done" is not a condition.

Three loops, three stop rules

  • Claude Code: Set with "/goal <condition>". Status with "/goal". Stop with "/goal clear" (also stop, off, reset, none, cancel). Evaluator small model determines met, not yet, or impossible from conversation context. No turn cap by default; configure one in the prompt if desired. Idle check-ins occur after background work sits for 30 minutes (cap of 3).
  • OpenAI Codex: Set with "/goal <objective>". Status with "/goal". Pause with "/goal pause", clear with "/goal clear". Resume with "/goal resume". Codex stops when it is confident the stopping condition holds based on evidence, not belief. Built for runs lasting hours or days, not a 20-turn sitting. Enable via "codex features enable goals" if missing (CLI 0.128.0+).
  • Hermes Agent (Nous Research): Set with "/goal <text>". Status with "/goal status". Stop with "/goal pause" or "/goal clear". Auxiliary judge evaluates done, blocked, continue, or wait from the last 4 KB of output. Default budget of 20 continuation turns configured in ~/.hermes/config.yaml under goals.max_turns. Supports /subgoal and shell quality gates.

One goal per session is enforced on all three. A new /goal replaces the old one. On Hermes, replacing mid-run can be rejected until you /stop the continuation.

What the circulating draft gets wrong

  1. "Roughly 20 turns, you in the chat the whole way." Twenty is the Hermes default budget and an example bound in Claude Code docs. It is not the Claude or Codex design. Codex is built for long-running workflows. Claude Code will keep going until the condition holds, the evaluator calls it impossible, or an error clears the goal.
  2. "Do not mark anything complete on your own." That fights the product. The judge job is to mark the condition met. Your job is to write a condition a judge can check, and to read the evidence before you trust the verdict.
  3. "Save artifacts under ~/Desktop/<slug>/." A personal convention, fine in your own prompt, but not part of /goal. On Claude Code, a goal does not change permission mode. In manual mode it still prompts for unapproved tool calls. Auto mode lets tools run without you; /goal starts the next turn.
  4. Trust-list commands as the fix when Goal is missing. Running "claude config trust remove ~/Desktop" is not how you enable /goal. Removing a trust entry changes permissions, not feature switches. If /goal is missing in Claude Code, update the CLI. In Codex, enable features.goals.
  5. An 80 to 250 word authoring skill that interrogates you, then hands you a fenced block. The fence is a bug. A slash command fires only when "/" is the first character of the message you send. No leading whitespace, no preamble, and no markdown fences around the prompt you run.
Interactive Claude Code Session: Autonomous Goal Execution
production-service/Goal: Auth Suite Migration
/goal all tests in test/auth pass and the lint step is clean. Prove it with the test command and the lint command output in the transcript. Do not modify unrelated test files. If a failure is an environment error you cannot fix, stop and name it. Or stop after 20 turns.
Analyzing test failures. Updating token calculation in src/auth/token.ts to handle clock skew correctly without touching unrelated session routes.
Goal complete in 2 turns. All auth tests pass cleanly and lint verification is recorded in the transcript. The autonomous loop has concluded.
Auto
OpusExtra high
Interactive terminal session: inspect how Claude Code executes a verifiable /goal and evaluates completion.

When it works

Use /goal when you would otherwise type "continue" three times, and when done is a verifiable check.

Closed-world work fits: migrate a module until every call site compiles and tests pass, implement a design doc until acceptance criteria hold, split a file until each piece is under a size budget, empty a labeled issue queue, or drive a benchmark under a threshold without regressing a suite.

Skip it for a one-turn edit, a taste call with no fixture, a loose backlog, or anything irreversible you have not already allowed. Send-money, sign-as-me, and post-as-me stay outside the loop.

The prompt that earns the loop

Write the condition as the argument. Six parts, in one single message:

  1. The end state, in words a stranger could mark yes or no.
  2. The check: the command, the file, the benchmark, or the screenshot.
  3. The constraint: what must not change.
  4. The boundary: which paths or inputs are in play.
  5. The blocked stop: what to report when no valid path remains.
  6. Optional: a turn or time clause, if this product does not already cap you.
You type: /goal Pricing page at /pricing has three working Checkout buttons (Starter $19, Pro $49, Team $149). Clicking each creates a Stripe Checkout session and a successful test payment appears in the Stripe test dashboard. Prove it with the route handler test and one test-mode payment per price. Do not change unrelated routes. If STRIPE_SECRET_KEY or a price id is missing, stop and name the missing input. Or stop after 20 turns.
Comment: Inspect status during execution:
Command: /goal
Comment: Clear an active goal immediately:
Command: /goal clear
The directive prompt must start with /goal as the first character, followed by the 6-part condition.

Cross-Network Perspectives

For DevOps engineers managing GitHub repositories, CI loops, and automated PR agents, explore our guide on ClaudeSkillsGitHub: [A /goal Is a Condition, Not a Sitting: Autonomous Loop Mechanics for GitHub PR Agents](https://claudeskillsgithub.com/blog/goal-is-a-condition-not-a-sitting).

For systems architects, CTOs, and engineering leaders designing heterogeneous Agentic OS harnesses and token economics, read the breakdown on ClaudeSkillsGuide: [A /goal Is a Condition, Not a Sitting: Systems Architecture and Evaluator Models in Autonomous Loops](https://claudeskillsguide.com/blog/goal-is-a-condition-not-a-sitting).

Stay connected

Never miss a post

Updates on format changes, community features, and skill building.