Skip to main content
Choose none, reuse, or fresh from the state the verifier must access, and extract any artifacts needed later before the task Environment closes.

Three Modes

In all three modes, the runtime calls collect_artifacts() while the task Environment is still alive. This hook extracts submissions; it does not decide the score.

Set Defaults and Per-Task Overrides

Set a class-level default when every sample uses the same mode:
Set the mode on individual TaskSpec values when samples require different verifier paths:
The runtime Planner initially resolves the mode in this order:
This is the selection order while building the initial ExecutionPlan. Matching Recipes can then adjust the plan according to their own contracts. If a Recipe changes the evaluation Environment, its implementation and tests must state which fields it may override and which it must preserve. When debugging the effective mode, inspect resolved_execution_plans in run_info.json; it records the plan after Recipe adjustments.

none: Evaluate in the AgentCompass Process

Use none when evaluation depends only on TaskSpec, PreparedTask, and RunResult. Do not read the task workspace in this mode:
If a controller-side evaluator calls another Model, configure that judge Model explicitly and record its version and inference parameters. Do not silently let the Model under test score its own result.

reuse: Inspect the Task Environment

reuse evaluates before the task Environment closes, so the verifier can see the workspace left by the agent:
The verifier path and its dependencies must exist in the task Environment. Evaluation uses the resolved evaluation_network_policy; do not assume the execution-stage network permissions remain active. For a complete production reuse implementation, inspect terminalbench2.py.

fresh: Extract First, Then Verify in Isolation

fresh does not automatically copy the task workspace into the evaluation Environment. First, use collect_artifacts() to convert the submission into RunResult.artifacts, which can cross the Environment boundary:
After the task Environment closes, the runtime opens a new evaluation Environment and passes it to evaluate(). The evaluator writes the captured artifact into the new Environment, then runs the official verifier:
A production implementation should also limit artifact size, validate file types, handle empty submissions, and record the verifier return code, timeout state, and truncated output as result evidence. For a complete fresh + collect_artifacts() implementation, inspect deepswe.py.

Check Before Choosing a Mode

  • Choose none when scoring depends only on an answer or in-memory objects; do not create an extra sandbox for simple scoring.
  • Choose reuse when the verifier must see the original filesystem modified by the agent, and ensure the verifier does not corrupt results that must be retained.
  • Choose fresh when the verifier must not trust dependencies or processes left by the agent, and transfer only the minimum required submission.
  • Set explicit timeouts for commands in prepare_task(), collect_artifacts(), and the verifier, and make every step safe to repeat during retries.
  • Use different statuses for evaluation failure and a valid zero score; see Results and Aggregation for the mapping.