Scenario
Two of two evals failed, and none of them ran
RolesAI Evaluation and ReliabilityAgent Systems Engineering
- Engine
- docker-agent v1.149.0 and sbx v0.47.0
- Model
- ai/qwen3:4b through the local model runner, as the subject and as the judge
- Hardware
- one Mac, no GPU
Situation
A nightly job scores the files agent against two saved eval sessions, with a local model as the judge. Last night the job printed Errors: 2/2 evaluations failed and a total cost of zero, and it blocked a pull request. The author of the pull request was told that the agent regressed. The author replied that the change was one word in the instruction and asked for the sessions, and there were none.
The on-call engineer tried again with the models gateway flag on the command, pointed at the address that containers use for the model runner. That attempt exited 1 before it ran anything, with an HTTP 403 in the last line. A third attempt, with the same address set in the environment of the eval containers, ran both evals. You review the three runs and the two scores that came out of the third one.
Questions
- The first run says that two evaluations failed. What in its output tells you whether any evaluation ran?
- Why did the second attempt stop before the first eval, and what does the 403 name?
- The third attempt turned a flag into an environment variable. Who reads the variable, and who does not?
- Which number in the third run is a finding about the agent, and what did the agent do to earn it?
- Rewrite the gate so that an eval that did not run cannot block a pull request as a regression.
Commit to a cause after each listing. Write it down before you read the next one.
Evidence
the eval run that blocked the pull request
Read the line under each failed eval before you read the summary.
$ docker-agent eval fixtures/agents/files.yaml fixtures/evals --judge-model dmr/ai/qwen3:4b -c 1 --output work/eval-results
Evaluation run: <run>
Loading evaluation sessions...
Validating judge model...
Pre-building 1 container image(s)...
Running 2 evaluations with concurrency 1
✗ Count the lines of README.md ($0.000000)
✗ running docker agent in container: container failed: exit status 1 (stderr: Error: failed to get models: docker --config=/root/.docker --context=default model status --json: : exec: "docker": executable file not found in $PATH)
✗ List the files in the working directory ($0.000000)
✗ running docker agent in container: container failed: exit status 1 (stderr: Error: failed to get models: docker --config=/root/.docker --context=default model status --json: : exec: "docker": executable file not found in $PATH)
[██████████] 100% (2/2) ✓0 ✗2
❌ Errors: 2/2 evaluations failed
Total Cost: $0.000000Source: manuals/docker-sandboxes-101/capture/out/22-eval.txt, lines 1-16
the summary block of the first run
Every total is 0, and sessions is null.
"summary": {
"total_evals": 2,
"failed_evals": 2,
"total_cost": 0,
"sizes_passed": 0,
"sizes_total": 0,
"tools_f1_sum": 0,
"tools_count": 0,
"relevance_passed": 0,
"relevance_total": 0,
"assertions_passed": 0,
"assertions_total": 0
},
"sessions": nullSource: manuals/docker-sandboxes-101/capture/out/22-eval-run.json, lines 14-27
the second attempt, with the models gateway on the command
The failure comes before any eval runs, and it names the judge.
$ docker-agent eval fixtures/agents/files.yaml fixtures/evals --judge-model dmr/ai/qwen3:4b -c 1 --models-gateway http://model-runner.docker.internal/engines --output work/eval-results-gateway
Evaluation run: <run>
Loading evaluation sessions...
Validating judge model...
Total Cost: $0.000000
Total Time: <dur>
Sessions DB: $CAPTURE/work/eval-results-gateway/<run>.db
Sessions JSON: $CAPTURE/work/eval-results-gateway/<run>.json
Log: $CAPTURE/work/eval-results-gateway/<run>.log
Error: running evaluations: judge model validation failed: streaming judge response: HTTP 403: POST "http://model-runner.docker.internal/engines/v1/chat/completions": 403 Forbidden
[exit 1]Source: manuals/docker-sandboxes-101/capture/out/22-eval-gateway.txt, lines 1-14
the third attempt, with the gateway passed to the containers
Both evals ran. Read what the one remaining failure is about.
$ docker-agent eval fixtures/agents/files.yaml fixtures/evals --judge-model dmr/ai/qwen3:4b -c 1 -e DOCKER_AGENT_MODELS_GATEWAY=http://model-runner.docker.internal/engines --output work/eval-results-container-env
Evaluation run: <run>
Loading evaluation sessions...
Validating judge model...
Pre-building 1 container image(s)...
Running 2 evaluations with concurrency 1
✓ Count the lines of README.md ($0.000000)
✓ size S
✓ tool calls
✓ relevance 1/1
✗ List the files in the working directory ($0.000000)
✓ size S
✓ relevance 1/1
✗ tool calls score 0.67
[██████████] 100% (2/2) ✓1 ✗1 (tools ✗1)
✅ Sizes: 2/2 passed (100.0%)
✅ Tool Calls: 83.3% avg F1 (2 evals)
✅ Relevance: 2/2 passed (100.0%)Source: manuals/docker-sandboxes-101/capture/out/22-eval-container-env.txt, lines 1-20
the expected tool calls of the list-files eval
One call to list_directory, and nothing else.
{
"message": {
"agent_name": "root",
"message": {
"role": "assistant",
"tool_calls": [
{
"id": "call_m101_ls",
"type": "function",
"function": {
"name": "list_directory",
"arguments": "{\"path\":\".\"}"
}
}
]
}
}
},Source: manuals/docker-sandboxes-101/capture/fixtures/evals/list-files.json, lines 13-30
the second tool call the agent made in the list-files eval
The eval expected no call after list_directory.
"tool_calls": [
{
"id": "<call-id>",
"type": "function",
"function": {
"name": "shell",
"arguments": "{\"cmd\": \"wc -l README.md\", \"cwd\": \".\"}"
}
}Source: manuals/docker-sandboxes-101/capture/out/22-eval-run-container-env.json, lines 314-322
the base URL of the model runner for each caller
The host and a container do not share a base URL.
| Caller | Base URL | Evidence |
|---|---|---|
| a process on the host | `http://localhost:12434` | [capture](manuals/docker-sandboxes-101/capture/out/25-models.json) |
| a container on Docker Desktop | `http://model-runner.docker.internal` | [capture](manuals/docker-sandboxes-101/capture/out/26-compose-up.txt) |
| a container on Docker Engine | `http://172.17.0.1:12434` | {{docs-dmr DMR REST API}}, not captured |
| a process on the host, through the Docker socket | `http://localhost/exp/vDD4.40` | [capture](manuals/docker-sandboxes-101/capture/out/25-model-status.json), `endpointHost` |
| `docker-agent` inside a sandbox, through its proxy | `http://host.docker.internal:12434` | [capture](manuals/docker-sandboxes-101/capture/out/27-inside-run.txt) |The answer
Show the walkthrough
- Read the line under each verdict. Both evals carry the same reason: the agent container failed with exit status 1, and its stderr says that it could not get models because the
dockerexecutable was not found in the path. The agent inside the eval image looks for the model runner through the docker command line, and the pinned release image has no docker command line. The agent never answered a prompt. Nothing was scored. - Read the summary block.
failed_evalsis 2, and every other count is 0:total_cost,sizes_total,tools_count,relevance_total.sessionsis null. A failed verdict with zero totals and no sessions is an eval that never started, not an agent that did badly. - Read the gateway attempt. The flag moved the model address for the whole command. The judge is validated first, and the judge runs on the host, not in a container. The host cannot reach the container-only name, so the judge check failed with HTTP 403, and the command exited 1 before it built a container. The 403 names the judge request, not the agent.
- Read the container-variable attempt.
-e DOCKER_AGENT_MODELS_GATEWAY=...sets the variable inside the eval containers only. The judge kept its host address. Both evals ran. Sizes passed 2 of 2, relevance passed 2 of 2, and tool calls averaged an F1 of 83.3 percent. One eval still failed, ontool calls score 0.67. - Read the expected calls and the extra call. The list-files eval expects one assistant turn with one
list_directorycall. The agent made that call, and then a second call toshellwithwc -l README.md. One expected call, two actual calls, F1 of 0.67. This is the only number in the three runs that says something about the agent: it did one step more than the saved session. - Read the base URL table. One model runner, and a different base URL for each caller: a host process uses
localhost:12434, a container usesmodel-runner.docker.internal, and a sandboxed agent goes through the sandbox proxy. The judge and the subject ran in two places, so they needed two addresses.
Show the resolution
The blocked pull request was an infrastructure failure. The eval containers had no way to find the model runner, and the first run scored nothing. The fix is the third command: pass the gateway to the containers with -e, and leave the judge on the host with its own address. The proof is in that run: two evals ran, sizes 2 of 2, relevance 2 of 2, tool calls at an F1 of 83.3 percent, with cost still zero because a local model has no price. On a local runner the cost cannot tell a run from a non-run, so read the totals and the sessions.
The gate changes in two ways. It fails the job as broken when the error count is above 0, and it reports a regression only from evals that ran. And the remaining 0.67 becomes a decision for a person: the agent added a line count with shell after the directory listing. If that extra call is wanted, the saved session gains a second expected call. If it is not, the instruction changes. Either way the eval did its job, which is to catch a call that the saved session did not ask for.
Show the wrong turns
“The agent regressed, revert the pull request.”
No eval ran. Both failures are container errors, every total in the summary is 0, and
sessionsis null.“Put the gateway flag on the command so the containers find the runner.”
The flag also moves the judge, which runs on the host and cannot reach a container-only name. The run fails with 403 before any eval starts.
“Rebuild the eval image with the docker command line inside.”
The release image is pinned, and the containers lacked an address, not a binary. The eval command has
-eto hand them that address.“Add the
shellcall to the expected list and move on.”First decide whether the extra call is wanted. The eval exists to catch a call the saved session did not ask for.
Show the general rule
An eval result has two layers: whether the eval ran, and what it scored. Zero totals and no sessions say the first layer failed, so read the error under the verdict before the verdict. Separate errors from failures in the gate. And remember that a judge and a subject can run in different places, with different addresses for the same service.
Taught in
The eval section records the three attempts, and the model runner section maps the base URL of each caller.