﻿# OpenHands goal loops distinguish judge completion from iteration caps

OpenHands goal loops audit an objective with a judge and return complete or capped outcomes; ending at a round limit is different from proving every requirement finished.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-openhands-goal-judge-outcomes/
Language: en

## Turn the request into an auditable objective

OpenHands' [goal-loop guide](https://docs.openhands.dev/sdk/guides/convo-goal) describes an agent working on an objective and a judge auditing the resulting transcript. A useful objective specifies the artifact and observable acceptance condition. For a parser correction, name the failure case and relevant existing check. “Improve the project” gives the judge little basis to distinguish completed work from a plausible summary of partial activity.

## Understand the outer feedback loop

After the agent finishes a run, the judge produces a completion decision and missing-work feedback. If work remains and the round limit has not been reached, the loop sends that feedback back into the same conversation. It does not create an independent side conversation for every round. The accumulated history therefore includes the objective, work and corrective follow-ups, which should remain connected to the artifacts they describe.

## Read the terminal outcome literally

The SDK distinguishes `complete` from `capped`: the latter means the maximum audit rounds were reached. Preserve the final missing-work report rather than converting a cap into a success message. The [Canvas conversation guide](https://docs.openhands.dev/openhands/usage/agent-canvas/conversations) also describes interruption by a normal user message. That hands control back to the user; it does not certify the objective or imply that earlier edits were reverted. Inspect the resulting repository state before resuming.

## Distinguish the judge from an inner critic

The [critic guide](https://docs.openhands.dev/sdk/guides/critic) concerns feedback and refinement within an agent run. The goal judge decides whether the overall objective needs another run. These layers can compose and produce additional model calls. The goal guide recommends a separate judge LLM instance and usage identity even when the model is the same. This helps account for evaluation work separately and avoids accidentally sharing callback or streaming state.

## Keep acceptance evidence outside the verdict label

A judge audits what the transcript shows, so preserve actual command results and relevant artifact observations. An unsupported agent statement that tests passed is weaker evidence than the observed check. [Task contracts](/journal/learn-codex-task-contract/) make completion concrete, while [tool observations](/journal/learn-codex-tool-observation/) tie the verdict to real work. Use capped or interrupted outcomes to plan continuation. Reserve a completed-work claim for a result whose required conditions are actually demonstrated.
