Skip to content

feat(verifiers): each judge call's record names exactly what it was sent, and a judge's settings name each turn's trajectory source - #897

Merged
earakely-scale merged 8 commits into
mainfrom
edgararakelyan/judge-input-reference
Nov 24, 2026
Merged

earakely-scale merged 8 commits into
mainfrom
edgararakelyan/judge-input-reference

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

PR 3 of 4 for FD-5929 (G13, judges record how they ran). Each judge call's record now names exactly what the call was sent, and a judge's settings name the trajectory source it read for each turn. eval show --judge-input (FD-6088) will read both.

What a call was sent, stored by sha256. Each record in a grade's judge_calls gets input: {object_url, bytes, sha256}. The object lives under judge-inputs/<sha256> in the object store, so identical content is stored once: a retried request's input, or a file another run already staged.

  • A direct call's input is what core hands LiteLLM, as one JSON object with screenshots inline: messages, response_format and settings.
    • settings are the config's [model.params] with the run's effort and thinking budget over them (model_call.sent_params).
    • Credentials stay out under config show's secret-key rule. extra_headers and any other secret-shaped key are dropped, through tables and lists, unless the value is a number such as max_tokens. A URL's userinfo is masked.
    • When the judge drops the response format, after an endpoint refuses it with images, the next request gets an input of its own.
    • A request cancelled mid-call (a sibling batch failed the run) keeps its input and endpoint host.
  • An agent call's input is its message, a manifest of the files the judge step staged in its sandbox (files), and, for a judge the task deployed (agent_name), what the task's own steps loaded there (loaded).
    • A file written as text is stored by sha256 too (path, object_url, bytes, sha256); one copied from a stored object is named by its URL.
    • loaded is each load_artifact load into the judge's agent, as the run recorded it: artifact id and version, destination, files (load_artifact.loads_into). This is best effort: a file another step wrote by running a command there (verify_sandbox, run_code) is recorded nowhere, so it isn't listed. On the hub, about 32k of the 48k agent-judge tasks load files into their judge with load_artifact, and about 2.6k more write them with commands.

Uploads run in the background (judge_utils/judge_inputs.py). A reference is known at once from its sha256, so nothing on the judging's path waits for the store:

  • the puts run on a process-wide pool of 16 threads of their own, not the event loop's default pool, so a slow store holds up only other judge uploads;
  • the step waits for the uploads still running once, before it writes its grade (VerifierTaskStep.settle, a new no-op hook in the base, at most 120 s); an agent call's input is stored then, after the files staged for it;
  • an upload that failed or hadn't finished by then, or a store that couldn't be had, is the record's (or the staged file's) input_error, which never fails the grade.

Each turn's source. verifier_settings.trajectory_sources lists each turn the judge read: turn, format (the stored label, such as claude-code-stream-json or atif/1), and, for an ATIF copy, the adapter_version that made it. The always-on judge's turns carry no labels, so it lists the formats its staged trajectories read as, marked guessed.

Smaller moves. _judged starts the run's record before staging, so staging records into it. load_artifact names the keys its loads are recorded under (LOADED_FILE_UNIVERSES, ...), which the judge, its prompt and add_skills now read.

Decisions (with Edgar, FD-5929)

  1. A direct call's stored input is what core hands LiteLLM except the key, in one object, screenshots inline. It isn't split into parts.
  2. An agent call's stored input is its message plus a manifest of every staged file. Files written as text are uploaded too. What the task's own steps loaded into a task-deployed judge is listed best effort (11-23).
  3. The trajectory source per turn goes in verifier_settings, as trajectory_sources. The always-on judge records its guessed formats.
  4. The reference lives on each call record, stored by sha256 under judge-inputs/. A failed write is recorded as input_error and never fails the grade.

Moves a score?

No. This only stores and records.

Cost: measured against main

A benchmark of the same judge workloads on main and on this branch, the model and the A2A judge answered at once so the only difference is this PR's work, against a real S3 bucket in us-west-2 from a laptop (whose round trips are slower than a hub worker's, so these are upper bounds):

Workload main: to the judge's first call branch branch: grade written, judge instant
direct judge, 1 call, about 90 real desktop frames 0.05 s 0.14 to 0.17 s 1.1 to 1.9 s
direct judge, 10 batches of the same frames 0.31 s 0.35 to 0.37 s 2.3 to 3.6 s
task-deployed agent judge, 20 turns, 320 staged files 11.5 s 11.5 to 11.9 s 11.8 to 12.2 s
always-on staging, 300 files 1.2 s 1.2 s 2.6 to 4.3 s
always-on staging, 1,500 files 5.9 s 5.9 to 6.0 s 12.1 to 16.5 s

The last column waits for every upload with a judge that answers at once; a real judge's own work (seconds to minutes) covers it. Before the uploads moved off the path, the agent judge took 53 to 60 s and always-on staging of 1,500 files 38 to 44 s.

Storage per grade: a direct screenshot judge stores the frames it sends, once per call (about 34 MB for 90 PNG frames at 1280x800; 52 MB for the 10-batch run, since each batch carries the same frames); an agent judge stores its staged text files, once each (about 24 MB for 1,500 always-on files). Last week the hub ran about 1.3k to 2.5k agent-judge runs a day, 10 to 70 always-on runs, and no direct screenshot judges.

Tests

  • test_judge_inputs_stored.py:
    • a direct call's record opens to exactly the messages, response format and settings it sent, checked against its sha256 and its key, with the config's params in, and its header and secrets out, even inside lists and URLs;
    • a request cancelled mid-call keeps what it was sent and its endpoint host;
    • a request retried with the same input shares one stored object;
    • a store that refuses the write, or can't be had at all, leaves input_error, and the judge still grades;
    • the staging recorder keeps each file, text stored, objects named;
    • an agent call's record opens to its message and its staged files; a task-deployed judge's lists what the run's steps loaded into it, and not into another agent;
    • the judge is sent its message while its staged files are still uploading;
    • an upload still running at the deadline is marked and the grade goes on; settling keeps its deadline even when an input is slow to encode;
    • a staged file that wasn't stored is marked in the manifest and in the call's input;
    • uploads held up by a slow store leave the event loop's threads free;
    • the trajectory sources name each turn's format and an ATIF copy's adapter version; a judge that reads the trajectory records them, and an always-on judge keeps each file it staged and its guessed formats.
  • judge_settings_wire_test.py: through LiteLLM's real client, the stored input's messages equal what reached the fake endpoint, and its sha256 matches.

E2E

Run on an admin VM through the real LiteLLM proxy, behind a logging pass-through that checks each request against its record; every stored input opened from the store and checked against its sha256. This round, on e0ed679 and main e4b20bd side by side, spent about $2.

  • Direct-judge scenarios, 8/8: the six from the first round (effort and thinking on Claude, left out on gpt-4o-mini, effort only on gpt-5-mini, xhigh refused, the run's override), and two with 28 real desktop screenshots: per-criterion frames on gpt-4.1-mini, and final frames in 3 batches on Claude Haiku. Each stored input holds the images sent.
  • Bundle runs (agent-env run), the same grades on main and the branch:
    • judge-agent-effort, judge-agent-trajectory, judge-direct-trajectory and judge-task-loaded grade 1.0 on both; simjudge grades 0.0 on both, and always-on-judged grades 0.0 on both (its assistant replied to the school for the user, which the rubric forbids).
    • judge-task-loaded, a Claude Code judge the task deploys and fills with collect_artifacts and load_artifact: its input's loaded names both loads, the collected outputs at /tmp/agent_workspace and the reference at /data/reference.
    • always-on-judged, an always-on morning with a trigger-sent school mail, graded by always_on_agent_verifier: its input lists the 22 files staged for it, each stored; its trajectory_sources are guessed (unknown, 4 trajectories).
    • Step times match: the judge step took 13.8 s on main and on the branch with its store refusing every put; 23.9 s on the branch when its Claude Code judge made a third model call. The always-on run's steps took the same times on both.
  • Store faults, injected into the judge's uploads only, on three tasks each: every put refused (graded as before, each call input_error: ConnectionError); each put 20 s with the grade waiting 5 s (graded, input_error: TimeoutError: still uploading after 5s, the step 5 s longer); every third put refused (graded; the always-on input lists its 31 staged files, 12 marked input_error).
  • Chaos, 20 minutes: 271 runs of random models, efforts, budgets and batch sizes, 20 to 35% injected 500s at the proxy, and a store fault per run (118 working, 47 refused, 26 no store, 43 slow past a 3 s settle, 37 flaky); 45 runs judged real screenshots. 0 crashes; no stored input missing, mismatched or wrongly marked, and no grade a store fault changed. What it flags is the checker's, as in feat(verifiers): a judge sends the effort its route takes, and its grade records what each call carried #891: the OpenAI client's own retries (31), LiteLLM sending nothing to Claude for minimal (5), a failed run's cancelled calls landing in the next run's window (chaos-3-166), and a proxy fault the checker took for a store one (chaos-3-165).
  • First round, on d8697d1 and 55b339b: the same scenarios and bundle tasks, and 18 minutes of chaos (307 runs, 0 crashes), which found cancelled calls recorded without their input, fixed in 55b339b.
  • Integration Tests failed once on test_dns_over_udp_answers_every_query_a_client_sends_while_a_slow_nameserver_holds_them_open, a UDP test with a 2 s deadline that fails across PRs today (build(deps): bump the python-minor-and-patch group across 1 directory with 43 updates #845, feat(sandbox-providers): shared VM slots are walled off from each other, and one slot ends without ending the VM #829, feat(computer): snapshot a multi env's computer, for a judge to grade its files #772, fix(clock): computers and clock-following agents declare the times they hold, and the gateway refuses to take the clock outside them #892, feat(agents): Claude Code, Gemini, OpenCode, Letta Code and the proxy give each turn's counts by model #893); the retry passed.

Docs

For FD-6446:

  • each judge call's input reference, and what a direct and an agent call store, loaded included;
  • trajectory_sources;
  • the judge-inputs/ objects, uploaded in the background, and input_error.

Part of FD-5929 (G13).

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

The PR saves each judge call’s input by content hash and records the trajectory sources the judge read.

  • Judge grades link each model call to the input it received.
  • Judge settings name the trajectory source used for each turn.

Reviews (12) · Last reviewed commit: "fix(verifiers): judge uploads run on thr..." · Reviewed by Greptile

…ent, and a judge's settings name the trajectory source it read for each turn

A direct judge call's input is its messages, response format and settings; an agent judge call's is its message and a
manifest of every file put in its sandbox, each one written as text stored too. Each is stored by its sha256 under
judge-inputs/, so identical content is stored once, and the call's record in judge_calls names it as input, or as
input_error when the store refused it, which never fails the grade. verifier_settings.trajectory_sources lists each
turn the judge read with its format, an ATIF copy's adapter version beside it; the always-on judge lists the formats
its staged trajectories read as.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 23, 2026 21:08
earakely-scale and others added 2 commits November 23, 2026 13:23
…ms it sent, credentials left out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…it was sent and the host it reached

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/agent_env/config/model_call.py Resolved
earakely-scale and others added 3 commits November 23, 2026 13:39
…s and a URL's userinfo too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own steps loaded into its sandbox

A judge the task deployed (agent_name) grades from what load_artifact put in its sandbox; the input now names those
loads as the run recorded them. A file a step wrote by running a command there is recorded nowhere, so isn't listed.
Also tests the always-on judge's staged files and guessed trajectory sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rade waits for them once

Each upload's reference is known at once (its sha256 and key), the puts run beside the judging on their own
concurrency, and the step waits for those still running before it writes its grade (VerifierTaskStep.settle, at most
120 s), marking any that failed or hadn't finished input_error. An agent call's input is stored then, after the files
staged for it. Staging no longer waits on the object store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale and others added 2 commits November 23, 2026 15:08
…record's input one type, load records' keys from load_artifact

judge_inputs.py holds the background uploads (Uploads, StagingRecorder) and judge_usage the record; a direct call's
record takes its input's reference itself; the direct judge drops its per-variant cache, since an upload dedupes by
sha256; Uploads.wait cancels what's late, so failed only reads; load_artifact names the keys its loads are recorded
under and gives loads_into, which the judge, its prompt and add_skills read; calls() says a record is final once the
run settles; AGENTS.md says how the uploads run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at can't be had is input_error, and settling keeps its deadline

On the event loop's default pool, slow uploads could take every worker and stall the process's other thread work.
Building the store is inside the guard now, so a store without credentials marks the input instead of failing the
grade; and an agent call's input encoded at settle waits only until the deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit c13cbb0 into main Nov 24, 2026
38 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/judge-input-reference branch November 24, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant