Skip to content

feat(verifiers): judge_samples keeps each criterion's median of N judge calls, and min_judge_agreement can fail a split - #905

Merged
earakely-scale merged 14 commits into
mainfrom
edgararakelyan/judge-samples
Nov 25, 2026
Merged

earakely-scale merged 14 commits into
mainfrom
edgararakelyan/judge-samples

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Collaborator

What changes

The last of four PRs on judges recording how they ran. An LLM judge isn't deterministic: grading the same run twice can flip a criterion. With judge_samples: N a judge grades each criterion N times and keeps the median, so no single call decides it, and each row records how far its samples agreed. A task or run that needs a criterion never to shift raises min_judge_agreement, and then a split fails the grade. The defaults change nothing (1 sample), or vote (a bar of 0.5, which never fails). N samples cost N times the judge's calls.

judge_samples: N (default 1, so nothing changes unless asked)

  • Which judges: rubric_binary and rubric_partial, always_on_agent_verifier included (JudgeOutputFormatSpec.samplable). The evidence formats and user_sim_judge refuse a judge_samples above 1, or any min_judge_agreement, when the task loads. A run's count and bar reach them too: such a judge grades once, and its verifier_settings record judge_samples: 1 with what was asked in not_sent.
  • Each sample is a call of its own, in a fresh conversation as every judge call is, run like a batch: N samples times B batches share judge_batch_concurrency, so sampling adds calls, not parallel load.
  • Each criterion keeps its samples' median: the first sample's row that scored it, with its justification, and its outcome on a criterion with fixed outcomes. For an even N it's the lower of the two middle scores, always a score a sample gave. A score of 1 is always the agent's pass (the judge inverts a negative criterion's), so a tie fails: 2 samples pass only together, 4 need 3. An odd N is a plain majority vote.
  • Each sampled row also holds samples (every sample's score, verdict passed and justification, in order) and agreement: the share of samples whose verdict is the kept row's, to two places, so 0.67 is two of three, and 1.0 only when every sample agrees. Agreement counts verdicts, not scores: partial scores of 0.75 and 0.7 that both pass agree. A row of one sample is as before.
  • An agent judge the verifier deploys (judge_a2a_agent_id) gets a deployment of its own per sample: its own sandbox, the trajectory staged in it, its own agent config, terminated after. No sample can see or clobber another's files, and each call's stored input lists the files staged in its own judge's sandbox. A deploy that fails fails the grade, and every judge already deployed is terminated. Batches within a sample share that sample's judge.
  • The task's own agent judge (agent_name, filled by the task's load_artifact steps) takes every sample, side by side in its one sandbox, since the verifier can't recreate what the task's steps put there. A task whose judge writes scratch files can set judge_batch_concurrency: 1.
  • A sample that fails (out of retries, or timed out) fails the grade, as a failed batch does; the group cancels the others, and every call stays in judge_calls.
  • Each call's record in judge_calls names its sample, beside its batch and attempt. The legacy entry records judge_samples, and judge_sample_trajectory_object_urls for an agent judge's sampled calls.

min_judge_agreement (default 0.5): how many of a criterion's samples must give its kept verdict, as a share

  • The default never fails: the kept verdict is always the majority's, or the lower score's on a tie, so the median decides every row. 1.0 fails any split. With 2 or 3 samples a bar above 0.5 can only mean unanimous (agreement is 1 or 0.5, or 1 or 0.67); from 4 samples a bar such as 0.75 (3 of 4) or 0.8 (4 of 5) asks for a qualified majority.
  • A row under the bar fails the grade: status failed, no score, every row kept with its samples, and an error naming each split, such as c2 (2 of 3 samples pass it). The legacy entry gets judge_disagreement with the same rows. Then the step fails (JudgeDisagreementError), so the step's own retry_config can grade again with fresh samples, and after the last retry its fail_task_on_error decides whether the task fails.
  • A retry says why: the engine's retry line now names the failed step's error type, Step judge failed (JudgeDisagreementError); rolling back span …, for every retried step; it said only "failed" before. It leaves the message out, since some steps put a response body in theirs; the run record keeps it.

A split that stood is named. agent-env run's summary adds a line under each run whose grade stood with a split (TaskRun.splits), so a vote doesn't hide that the judge was unsure:

  tasks/judge-agent-effort.json v1: passed (check: 1, judge: 1), 42.9s, instance @local/…
    models: solver gpt-4.1-mini; judge claude-haiku-4-5-20251001
    samples split: judge on c2 (2 of 3 pass)

Where they're set: both are step fields and run overrides (user_overrides.judge_samples, user_overrides.min_judge_agreement), --judge-samples and --min-judge-agreement on agent-env run, task run, task run-batch and eval run, and run_bundle(judge_samples=, min_judge_agreement=). verifier_settings records them, with overridden naming a run's; a sampled judge records the bar it applied, the default included.

The rule lives in judge_utils/judge_samples.py (validated, validated_agreement, median_rows, disagreeing, disagreement, splits).

Also folded in, at Edgar's ask: the DNS-over-UDP test flake (test_dns_over_udp_answers_every_query_a_client_sends_while_a_slow_nameserver_holds_them_open), which failed Integration Tests across PRs (#845, #829, #772, #892, #893, #897). Its 2 s deadline started before a gc.collect(), and a full collection in a CI worker's heap can take seconds with the event loop held, so the wait ended before the nameserver's replies came back (reproduced: a 2.5 s collection gives exactly assert 1 == (20 + 1)). The collection couldn't catch the bug it was added for either: a task waiting on a socket is reachable from the loop's reader, so the test passes against the resolver before #848 too; the async lint #848 added guards that. The test now waits, generously, for every answer, without the collection.

Decisions (with Edgar)

  1. Which judges sample: rubric_binary and rubric_partial, direct and agent, always_on_agent_verifier included; the evidence formats and user_sim_judge refuse it for now.
  2. Any positive N; an even N's tie takes the lower score, so it fails (revised with Edgar after review: odd only was more restrictive than it needed to be).
  3. A sample is one more call, run like a batch, under the judge's batch concurrency. Revised in review: an agent judge the verifier deploys gets a deployment of its own per sample; the task's own judge takes every sample, side by side.
  4. A sampled row keeps the first median-scoring sample's row and every sample's score and justification.
  5. A failed sample fails the grade, as a failed batch does.
  6. Set by step, run override and --judge-samples; a judge that can't take a run's count grades once and records it in not_sent.
  7. A bar on agreement, min_judge_agreement (added in review): a split under it fails the grade, and then the step, as a judge error does; fail_task_on_error and retry_config decide what follows. Per criterion; agreement is on verdicts, so partial scores need no tolerance.
  8. Its default is 0.5, which never fails (revised in review from 1.0): at 1.0 splits compound across a rubric (a judge 90% consistent on each of 10 criteria fails about 96% of 3-sample grades), so a run-wide --judge-samples would fail most of an eval's grades, and a trainer would lose most rollouts. The run summary names the splits instead, and 1.0 is one setting away.

Moves a score?

No: the default is 1 sample. A task or run that sets N above 1 grades each criterion by its samples' median; one that also raises min_judge_agreement fails a grade its samples split on more than it allows.

Tests

  • test_rubrics_verifier_judge_samples.py:
    • a count is any positive integer, and a bar a number from 0 to 1;
    • each criterion keeps the first row that scored its median, with every sample's score, verdict and reason, and its agreement; an even count's tie keeps the lower middle score and the first sample that gave it (2, 4, binary and partial);
    • a row's agreement is the share of samples giving its verdict, not its score;
    • a task that asks a count below 1 or a bar outside 0 to 1, or samples a format without one score a row (an evidence format, user_sim_judge), or sets a bar on one, fails to load; both fields round-trip;
    • by default the median decides a split and each row says how much its samples agreed;
    • a bar of 1.0 fails a split grade, keeping each row and its samples, its error naming each split, the legacy entry's judge_disagreement the same rows, then fails the step;
    • samples that agree grade as before, recording the default bar of 0.5; one sample records no bar, and a bar without samples never fails;
    • a bar two of three meets keeps the median, and a higher one fails;
    • partial scores agree on their verdict, so close scores pass and a split verdict fails;
    • through Task.run, a split fails the task, or is tolerated and recorded when the step's fail_task_on_error is off;
    • two samples that split fail the criterion, keeping the failing sample's reason;
    • a direct judge grades each criterion three times and keeps each one's median, its calls naming their samples, its legacy entry too;
    • a judge of one sample grades as before;
    • batches times samples share the judge's concurrency;
    • a sample out of retries fails the grade with every call recorded;
    • a run's count and bar reach a judge that can take them and say they were overridden; ones a format can't take grade once and are recorded as not sent; a count of 0 or a bar of 1.5 fails the grade saying why, before any call;
    • the task's own agent judge takes every sample, each in a conversation of its own;
    • a judge the verifier deploys gets one of its own per sample, each staged, each called by its sample alone and terminated, each call's input naming its own judge's files;
    • a judge that fails to deploy for one sample fails the grade, and every deployed one is terminated;
    • the run flags set the run's count and bar and refuse bad ones.
  • test_always_on_agent_verifier.py: an always-on judge deployed per sample, grading a run with the PSI harness's agent labels, is still asked for context loss, and the entry counts it.
  • retry_test.py: a self-retry's line names the error's type, and not its message.
  • run_test.py: agent-env run names the criteria a sampled judge's samples split on in a grade that stood.
  • installed_test.py: --judge-samples and --min-judge-agreement need a bundle, as the other run options do.

E2E

Six rounds on admin VMs through the real LiteLLM proxy, behind a logging pass-through that checks each request against its record, with a checker holding each grade to the rules above; about $29 in all.

  • Real multi-agent tasks, on 4a40c79 beside main 4067fbc:

    • The setup: four bundle tasks of one office world (11 MCP servers, simulated colleagues, a solver, and three judges on the task's own Claude Code agent: two rubric judges and a validity judge), with rubrics of 7, 10, 17 and 38 criteria and every model swapped to Claude Haiku 5.5.
    • The runs: each task played once with its world kept up, then its judge steps graded again on that frozen world 7 to 29 times, plus full agent-env runs, on four VMs of their own.
    • The totals: 97 grades checked, 0 problems, $23.40.
    • No regression at one sample:
      • Scores: main and the branch graded each frozen world to the same scores in all 14 pairs.
      • What the judges got: the prompt each rubric judge got was byte-identical (the stored inputs' sha256 match), with the same agent config and call.
      • What the grades record: grades, settings and rows carry the same keys.
      • The summary: agent-env run's summary is the same apart from its numbers.
      • Time: the branch's judging averaged 7% longer (p = 0.04 over the 14 pairs), all of it inside the judge's own conversation. agent-env's own time per judge step was 0.24 s on the branch and 0.26 s on main, and the branch's judges wrote 5.5% more tokens (p = 0.13).
    • Time with samples: samples run side by side under judge_batch_concurrency (4).
      • Against one sample's time, 2 samples took ×1.03, 3 took ×1.11 and 4 took ×1.26.
      • 5 took ×1.89, since the fifth waits for a second wave; with concurrency 8, 5 took ×1.06 to ×1.11.
      • Cost grows with the count: about ×3 at 3 samples and ×4.5 at 5.
    • Agreement:
      • Where samples split: Haiku at max effort gave unanimous samples on every criterion of the four rubrics at every count. At low effort it split, and with a row added that it must decide at random it split on every task.
      • Default bar: the median decided each split. A bar of 0.67 kept a 2-of-3 split and 0.75 a 3-of-4.
      • A bar of 1.0: a split failed the rubric judge and the task with JudgeDisagreementError naming the row, and validity and the final score didn't run. Judge B's split was recorded as tolerated (is_fatal: false), and each legacy entry's judge_disagreement named the same rows.
    • Chaos:
      • 8 runs of random counts (1 to 5), bars (0.5 to 1.0) and concurrencies, 5 of them with injected model faults: every grade held the rules.
      • A SIGINT a minute into 4-sample judging cancelled the run and tore down all 6 sandboxes, the judge's included, leaving nothing up.
    • Full runs: agent-env run on main and the branch at one sample, and on the branch with --judge-samples 3. Every grade held and every run tore down. Judging at 3 samples took 234 and 264 s, against 154 to 224 s at one.
  • The default, on 280361b: a test task whose judge takes 5 samples and also grades a criterion it must decide at random split in all three runs; the median decided each (0, 1, 0) and the summary named each split. judge-agent-effort with 3 samples passed with samples split: judge on c2 (2 of 3 pass).

  • A bar of 1.0, on 729ab5e and 280361b: the same splits failed the grade and the task, the error naming each; with fail_task_on_error: false the task carried on; with retry_config on the judge step it was graded again with fresh samples until a unanimous grade stood. A split's message prints once on the failure line and once in the summary.

  • Agreement: 9/9 scenarios at the judge with bars from 0.5 to 1.0, on the step and for the run, partial scores, one sample, and an evidence judge that records a run's bar as not sent.

  • A judge per sample, on 226b170: a Claude Code judge the verifier deploys started 3 containers for 3 samples and 5 for 5; the task's own judge used 1 for 3; always-on staged each sample's run in a folder of its own; nothing was left running.

  • Even counts, on edbe475: 8/8 scenarios at 2, 3, 4 and 5 samples; every tie kept the lower score.

  • Beside main, on 5684084: six bundle tasks with 1 sample graded as on main (one agent judge's own variance aside); --judge-samples 3 sampled every judge that can, and user_sim_judge graded once with the count in not_sent.

  • Chaos: 205, 98 and 110 runs over three rounds (counts from 1 to 5, random bars, models, efforts, formats, proxy and store faults): 0 crashes, and every grade held the rules. What the checker flags is its own (the OpenAI client's own retries, LiteLLM sending nothing to Claude for minimal, a failed run's calls landing in the next run's window). Chaos came to 42 minutes, over the usual 30, since the agreement round was asked for.

Each round in full, and the fixes after each

Run on an admin VM through the real LiteLLM proxy, behind a logging pass-through that checks each request against its record, on 5684084 and main 4a95a6d side by side; about $3.10 spent.

  • Direct-judge scenarios, 10/10: the eight from 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 (effort and thinking per model, real screenshots) and:
    • 3 binary samples on gpt-4.1-mini: 3 calls, each row the median;
    • 3 partial samples in 2 batches on Claude Haiku: 6 calls;
    • a run's 5 on gpt-5-mini with effort: 5 calls;
    • a run's 3 on a screenshot evidence judge: graded once, judge_samples: 1, not_sent: {judge_samples: 3}.
  • Bundle runs (agent-env run), one sample, main and the branch: the same grades on five of six tasks. The sixth, judge-agent-effort, graded 1.0 on the branch and 0.0 on main: its Claude Code judge's own variance, the noise sampling is for.
  • The same six with --judge-samples 3:
    • every judge sampled 3 times, always_on_agent_verifier and a task-deployed agent judge included;
    • each row carries its 3 samples, and the checker confirmed every row is its first median sample's;
    • judge-agent-effort had a criterion split 1, 1, 0, which the median took, grading 1.0;
    • simjudge graded once with not_sent: {judge_samples: 3}.
    • A judge step's time grew modestly, since samples run side by side: direct judges took the same time, and agent judges up to about 20 s more.
  • A task that samples itself (judge_samples: 3 on a direct rubric_partial judge in batches of 2): 6 calls, partial scores per sample, graded.
  • Chaos, 20 minutes: 205 runs of random models, efforts, budgets, batch sizes and formats (133 binary, 49 partial, 23 screenshot), 0 to 35% injected 500s, and a sample count per run (93 none, 75 asked 3, 37 asked 5; set on the step or for the run). 0 crashes.
    • Every run recorded the count it asked, and every sampled row was its first median sample's.
    • Each screenshot evidence run given a run's count graded once and recorded it in not_sent (8 runs).
    • Each grade a sample couldn't answer failed (23), as decided.
    • What the checker still flags is its own:
      • the OpenAI client's own retries (36);
      • LiteLLM sending nothing to Claude for minimal (31);
      • cancelled calls landing in the next run's window (7), more often now that samples put more calls in flight;
      • failed grades' placeholder rows read as rows with no samples (11);
      • proxy faults the checker took for store ones (4).
  • A judge per sample, on 226b170 (the four agent-judge tasks with --judge-samples 3, and one with 5), each run's judge containers counted from Docker's events:
    • judge-agent-effort and judge-agent-trajectory, whose Claude Code judge the verifier deploys: 3 judge containers for 3 samples, and 5 for 5;
    • judge-task-loaded, the task's own Claude Code judge: 1 container, taking all 3 samples;
    • always-on-judged, whose judge the verifier deploys: each sample's stored input lists the 23 files staged in a folder of its own judge's sandbox (3 different folders);
    • after every run, nothing the run started was still up; every task graded as before.
  • c1dbebd, after the e2e, changes no path it ran: always_on_agent_verifier names judge_samples as its own parameter, run_bundle refuses a count that isn't positive before planning, and the DNS test's wait is named; each is covered by its unit test.
  • 36b2128, after the e2e: an always-on judge the verifier deploys per sample was no longer asked for context loss on a run with agent labels, since each sample staged the run in a task of its own and the flag it set never reached the run; the e2e's always-on run has no such labels. The flag is now a holder the run sets and staging fills, with a unit test that fails without it.
  • Even counts, on edbe475 (about $1.10):
    • judge scenarios with 2 and 4 samples (binary on gpt-4.1-mini and Sonnet, partial in batches on Haiku, a run's count of 2 on gpt-5-mini), and the 3 and 5 ones again: 8/8, every row its first low-median sample's;
    • judge-direct-trajectory with --judge-samples 2: two calls, graded 1.0 as before;
    • judge-agent-effort with --judge-samples 2: 2 Claude Code judge containers, one per sample; one criterion split 1 and 0, which the tie failed, so it graded 0.0 (it graded 1.0 at 1 sample, and at 3 samples, where one criterion split 1, 1, 0); nothing it started was left up;
    • chaos, 10 minutes: 98 runs, counts from 1 to 5, 0 crashes, 5 ties (all partial: 0.85 and 0.9 kept 0.85; 0.5 and 0.0 kept 0.0; 0.75, 0.75, 0.7, 0.7 kept 0.7), each the lower middle score. What it flags is the checker's: failed grades' rows checked for samples (7), the proxy's injected faults read as store ones (3), a run's count of 1 on an evidence judge, which is rightly not recorded as not sent (1), and as before the OpenAI client's own retries, minimal on Claude, and a failed run's calls landing in the next run's window.
  • The agreement bar, on 729ab5e (about $1.60; every grade held to the agreement rules by the checker: each row's agreement from its samples' verdicts, no row under the bar on a graded grade, and a split grade naming exactly the rows under it with each one's passes, with no score, its legacy entry's judge_disagreement listing the same rows):
    • 9/9 agreement scenarios at the judge: bars from 0.5 to 1.0 on the step and for the run, a run's bar over the step's, partial scores, one sample with a bar, and an evidence judge that grades once with the count and the bar in not_sent;
    • bundle runs (agent-env run) of a test task whose direct judge takes 5 samples and also grades a criterion it must decide at random:
      • at the then-default bar of 1.0 it split 1 of 5 on that criterion: the grade and the task failed, the CLI naming the split;
      • with fail_task_on_error: false, the task carried on with the failed step recorded as not fatal; the run is still reported failed at that step, as any failed step is;
      • with retry_config on the judge step, a split was rolled back and graded again, and the retry's unanimous grade stood. The first try's retry was refused because the task's other verifier ran beside the judge, the engine's existing rule; the rerun ordered the judge after it;
      • with --min-judge-agreement 0.6, it graded 1.0 with that criterion at 3 of 5;
    • judge-agent-effort with --judge-samples 3 split 2 to 1 on c2 and failed; with --min-judge-agreement 0.67 too, it graded 1.0. judge-direct-trajectory and judge-partial-samples agreed and graded as before. Nothing was left running;
    • chaos, 12 minutes: 110 runs with counts from 1 to 5 and random bars from 0 to 1.0, on the step or the run: 0 crashes; 90 graded, 15 failed for other reasons (proxy faults, refused efforts), 5 failed on a split, each naming its criterion. What it flags is the checker's, as before. Chaos across the four rounds came to 42 minutes, over the usual 30, since this round was asked for.
  • 14d73a3 (Greptile): a split's agreement stops at 0.99, so past 200 samples a single dissent can't round to 1.0 and pass the default.
  • ee74993: the e2e printed a split three times on a fatal failure and its reason not at all on a retry. The retry line now names the error, and the verifier leaves saying it to the task.
  • dfd287d and 280361b (Greptile): the retry line names the error's type alone (Step judge failed (JudgeDisagreementError); rolling back span …), since some steps put a response body in their messages; the run record and the grade keep the whole error.
  • 58ffd3e (review): min_judge_agreement defaults to 0.5, and agent-env run names the splits. Checked on a test host on 280361b ($0.31): at the default, the coin task split in all three runs and the median decided each (0, 1, 0), the summary naming each split, such as samples split: judge on coin (3 of 5 pass); judge-agent-effort with 3 samples passed with samples split: judge on c2 (2 of 3 pass), and at --min-judge-agreement 1.0 the same split failed the grade. At 1.0 a split's message printed once on the failure line and once in the summary, and a retry graded twice more, its line naming JudgeDisagreementError, before its unanimous third grade stood. Every grade held the agreement rules, and nothing was left running. Chaos wasn't run again: its random bars already covered 0.5, the same path as the new default.
  • The five rounds spent about $6.

Docs

The docs should cover judge_samples and min_judge_agreement (where they're set, which judges take them, the default 0.5 that never fails and 1.0 that fails any split, what each bar means at each N, the run summary's samples split line, agreement and samples on a row, the failed grade and JudgeDisagreementError with fail_task_on_error and retry_config, the median rule and an even count's tie, sample on a call record, not_sent for a judge that can't take a run's count or bar), and --judge-samples and --min-judge-agreement.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Adds repeated judge calls, per-criterion median scores, and an optional agreement threshold.

  • Rubric judges can repeat each criterion’s grade and keep its median.
  • A judge grade can fail when its samples disagree too much.
  • Retry lines now name the error type that stopped a step.
  • The DNS-over-UDP test waits for answers without forcing garbage collection.

Reviews (20) · Last reviewed commit: "refactor(verifiers): name agreement's de..." · Reviewed by Greptile

earakely-scale and others added 2 commits November 23, 2026 17:16
…orker, without a garbage collection that held the loop

Its deadline started before a gc.collect() that, in a test worker's large heap, can take seconds; the wait then ended
before the nameserver's replies came back, so it failed on CI across PRs. The collection couldn't catch the bug it was
added for either (a task waiting on a socket is reachable from the loop's reader); the async lint guards that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… times and keeps its median

A rubric_binary or rubric_partial judge given judge_samples N (a step field, a run override, or --judge-samples on
run, task run, task run-batch and eval run) grades each criterion N times, each sample a call of its own under the
judge's batch concurrency, and keeps each criterion's median: the row of the first sample that scored it, with every
sample's score and justification in samples. Each call's record names its sample; a sample that fails fails the grade.
N must be odd; a format without one score a row refuses it at load, and a run's count it can't take is recorded in
not_sent.

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 24, 2026 03:23
Comment thread src/agent_env/bundle/run.py Resolved
earakely-scale and others added 2 commits November 23, 2026 19:37
…dle refuses a count that isn't positive and odd, the DNS test's wait is named

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t of its own per sample

Its samples share no sandbox, so none can see or clobber another's files: each sample's judge is deployed, has the
trajectory staged in its sandbox and is terminated after, and each call's stored input lists the files staged in its
own judge's sandbox. A deploy that fails fails the grade and every judge already deployed is terminated. The task's own
judge (agent_name) still takes every sample.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale and others added 3 commits November 23, 2026 20:47
… for context loss

Staging ran in each sample's own task, so the flag it set never reached the run: its judge calls lost the
context_loss fields and the entry its count. The flag is now a holder the run sets, which staging fills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the lower score

An even count's median is the lower of its two middle scores, always one a sample gave. A score of 1 is always the
agent's pass, so a tie fails: two samples pass only together, four need three; an odd count stays a majority vote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… unless min_judge_agreement allows it

Each sampled row records its agreement, the share of samples giving its verdict, and each sample's verdict. A row
under min_judge_agreement (1.0 by default, so any split) fails the grade, keeping its rows, then the step, so the
step's fail_task_on_error and retry_config decide what follows. Set on the step, per run, or with
--min-judge-agreement on run, task run, task run-batch and eval run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale and others added 2 commits November 24, 2026 09:08
Agreement is kept to two places so 0.67 is two of three; past 200 samples a single dissent rounded to 1.0 and passed
the default bar. A split's agreement now stops at 0.99, and is 1.0 only when every sample agrees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… said once

The e2e showed a judge split printed three times on a fatal failure and not at all on a retry: the verifier logged it,
then the task's failure line and the summary repeated it, while the retry line said only "failed". The retry line now
names the error, and the verifier leaves saying it to the task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/agent_env/task/task.py Resolved
earakely-scale and others added 4 commits November 24, 2026 09:46
The retry line printed the whole exception message, and some steps put a full response body in theirs. It now gives
the type and the message on one line, cut to 300 characters; the run record keeps the whole error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…un names the criteria samples split on

At 1.0 a split anywhere failed the grade, and splits compound across a rubric: a run-wide --judge-samples could fail
most of an eval's grades. 0.5 never fails, so the median decides unless a task or run asks for more, and 1.0 still
fails any split. So a vote doesn't hide disagreement, the run summary names each criterion a grade that stood split on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Even cut short, the message could carry the start of a response body some steps put in their errors. The line now
names the error's type, which says why at a glance; the run record and a judge's grade keep the whole error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…samples

# Conflicts:
#	src/agent_env/cli/run.py
#	tst/unit/bundle/run_test.py
The cap is derived from the places, so the display precision and the check that only unanimous samples read 1.0
can't drift apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(verifiers): judge_samples grades each criterion an odd number of times and keeps its median feat(verifiers): judge_samples keeps each criterion's median of N judge calls, and min_judge_agreement can fail a split Nov 24, 2026
@earakely-scale
earakely-scale merged commit d694939 into main Nov 25, 2026
38 of 39 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/judge-samples branch November 25, 2026 00:49
earakely-scale added a commit that referenced this pull request Nov 25, 2026
The conflict was in always_on's context-loss gate: main holds it in a _ContextLoss each run sets (#905), and this
branch asks a run whose trajectories hold a compaction too; the gate is main's holder, asked through _harness_read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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