Agents & Automation

Hermes Agent’s /goal: how the judge loop decides when work is done

Hermes Agent's /goal keeps an agent working until a judge model says the goal is met. Here is what the judge reads, what stops the loop and how to keep it safe.

Finley · FoxAI World4 min read
18
Finley holds a clipboard beside robots and workflow icons, with the Hermes Agent logo above.Goal loop, judged

Conceptual cover created with AI.

You ask an agent to fix the failing tests, step away for coffee, and come back to a single reply: a partial fix and a polite “Should I continue?” Hermes Agent, the open-source agent from Nous Research, has a command built for exactly that gap: /goal. Here is how it decides when work is finished, and where you still need to decide.

What does /goal actually do?

A goal in Hermes is a standing objective: an instruction that survives across turns instead of ending with the next reply. After each turn, Hermes checks whether the goal is met. If it is not, it feeds a continuation prompt back into the same session, and the agent keeps working. The documentation credits the idea to Codex CLI 0.128.0.

Finley sits behind a Hermes Agent laptop surrounded by papers, a robot, scales and a padlock shield.
AI-generated conceptual illustration.

How does the judge decide?

The check is done by a judge model, a separate model call that only rates progress. In Hermes it runs as the goal_judge auxiliary task, uses your main model by default, and can be routed to a cheaper model if cost matters. It reads two things: the goal text and the agent’s most recent final response, roughly the last 4 KB of text. It answers with one of four verdicts: done, continue, blocked or wait.

That input is the key limit. The judge does not inspect your files or run your code. It judges the agent’s last answer, so a confident summary can look finished even when the work behind it is not.

What stops a runaway loop?

There is a turn budget: 20 continuation turns by default, set with goals.max_turns in config.yaml. When it runs out, Hermes pauses automatically and shows a message such as “Goal paused — 20/20 turns used.” You then choose: /goal resume restarts the loop and resets the counter to zero, /goal pause stops it without losing the goal, and /goal clear drops the goal entirely.

How do subgoals and quality gates make “done” checkable?

/subgoal appends extra acceptance criteria to an active goal. The goal is only marked done when the original objective and every subgoal are met.

A quality gate goes further. It is a deterministic shell command that must exit with code 0 before the goal can complete at all, for example your test command. Gates run before the judge, and by default each gets 3 retries and a 5-minute timeout. If a gate uses up its retries, the goal pauses.

Is it safe to let the agent work alone?

Hermes checks commands against a list of dangerous patterns, such as recursive deletes with rm -r, and asks for approval before running a match. Scheduled cron jobs, where nobody is there to approve, use cron_mode, which defaults to deny: the command is blocked and the agent has to find another path.

YOLO mode (--yolo, /yolo or HERMES_YOLO_MODE=1) bypasses all approval prompts for the session. Only a hardline blocklist, including rm -rf /, stays in force. On container backends such as Docker, Modal, Daytona or Vercel Sandbox, the dangerous-command checks are skipped because the container itself is the security boundary.

How should you write a goal?

Make it clear and checkable. “Fix every failing test and make the test suite pass” gives the judge, and a gate, something concrete. “Make it better” gives them nothing to measure.

Our assessment: the facts above point to one practical rule. The judge reads a short text, while a gate runs real code, so treat the gate as your definition of done and the judge as the step that decides whether to keep going. That is our reading of the design, not a claim from Nous Research. And keep approvals on outside a sealed test container; a long loop is exactly where an unreviewed command can do the most damage. When the loop stops, read what it built. Who takes the next step? Still you, at the final review.

Ask AI about this article

Opens in a new tab with the question filled in.

Sources and research

Written by FoxAI World. The cover and illustrations are AI-generated conceptual artwork.

Your favourites

This list stays in this browser on your device. No account is needed, and other visitors cannot see it.

Use a story’s bookmark button to add your first favourite.