Skip to content

feat(lint): a judge that runs in the solver's own agent is an error - #879

Merged
earakely-scale merged 2 commits into
mainfrom
edgararakelyan/fd-5929-g13-judges-record-how-they-ran
Nov 23, 2026
Merged

earakely-scale merged 2 commits into
mainfrom
edgararakelyan/fd-5929-g13-judges-record-how-they-ran

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Collaborator

What

The new error. An agent judge whose agent_name names the agent a step prompts as the agent under test is now a task lint error, judge-as-solver:

step 'verify': its judge runs in 'default-agent', the agent under test, so the solver grades its own work; leave agent_name unset for a judge agent of its own, or name another agent

Why it's an error.

  • Such a judge runs in the solver's own deployed agent, so the solver grades its own work.
  • Before it grades, _configure_judge_a2a posts the judge's model, effort, output format and turn limit to that agent.
  • The A2A conversation was never shared: each judge call starts a new context. What the two share is the agent.

How it behaves.

  • Like G6's other errors, it refuses agent-env run, bundle register, task create, task validate and eval run.
  • --skip-lint runs the task anyway.
  • Training already refused this case. It now reads the same rule.

One definition of the solver's agents. solver_agents(steps), beside user_sim_agents in prompt_agent.py, returns the agents a prompting step talks to as the agent under test, not as its user. Five places read it:

  • bundle.plan.solver_steps;
  • the new lint rule (task.lint.judges_in_solver);
  • training's _untrainable;
  • bundle.resolve.played_deploys, which had its own copy;
  • the training harness's first-prompt pick, which had another.

agent_name_of(step) is now the one fallback to the default agent's name for all of them.

A name that isn't a string names no agent. That keeps lint answering instead of raising on a list or object agent_name.

A test for the out-of-retries item. It already held since G2, and now tests pin it: a direct judge, or an agent judge out of timeout retries, writes a grade with verifier_status: failed and its error.

This is PR 1 of 4 for FD-5929 (G13). #877 already records judge usage in step_usage, and #854 decides which trajectory source a judge reads. The next G13 PRs build on those.

Decisions (with Edgar, FD-5929)

  1. An error, as the Grades design says. A warning first was the alternative; Edgar chose the error.
  2. Only the solver's agent counts. That is the agent a prompt step prompts as the agent under test, the same rule training uses. A judge running in the user simulator's agent is not flagged: the user simulator has no stake in the score, and no hub judge does this.

What it refuses in the hub

Six task versions, all in one eval. I linted every task version the latest version of each hub eval runs, 11,553 of them, pulled from Redash today. Six judges run in the solver's agent: all six tasks of eval openclaw-mm-usersim-passk (mm-l12v4-*).

What those tasks do. In each, verify names default-agent, the claude-code-cli solver. So the solver grades its own work, after the judge reconfigures it to claude-sonnet-4-6.

The fix and the escape hatch.

  • eval run refuses that eval until each task's verify drops agent_name, so its judge deploys its own agent, or names a separate judge agent.
  • --skip-lint runs it meanwhile.
  • I'll tell the eval's owner when this merges.

The other judge agents are separate. 1,437 judge agents in the hub name an agent_name, and all of them name separate judge agents: judge, judge-strong, judge-weak and judge-snapshot-01. None of them is flagged.

Moves no score

This is a lint rule. No step's behaviour changes, so no stored task run's score moves.

Tests

lint_test.py:

  • the error and its message;
  • no error for a judge with no agent_name, one with its own judge agent, one in the user simulator's agent, or a direct judge (use_agent_judge: false);
  • junk agent names that aren't strings leave lint answering;
  • agent-env run --dry-run refuses the task, and --skip-lint runs it.

test_rubrics_family_grades.py:

  • a direct judge out of retries writes a failed grade;
  • an agent judge out of timeout retries writes a failed grade.

The harness and solver_steps tests pass unchanged.

E2E (fresh install of this branch)

I built both wheels from the branch and installed them into a fresh venv with no config, then ran a copy of the shipped hello bundle with two extra tasks:

Command Result
agent-env task lint bundle 1 error: tasks/self-graded.json: step 'verify': its judge runs in 'default-agent', the agent under test, …, exit 1
agent-env run bundle --task self-graded --dry-run refused: task lint found 1 of these; --skip-lint runs the tasks anyway, exit 1
the same with --skip-lint prints it as error:, Would run: tasks/self-graded.json v1, exit 0
agent-env run bundle --task own-judge --dry-run (judge in its own judge agent) Would run, exit 0
agent-env run bundle --task hello --dry-run Would run, exit 0

The hub sweep above ran on that same install's lint.

This rule is static and offline: it plans, calls no model and starts no container. So I ran the e2e and chaos from a fresh install on this machine rather than on an admin VM.

Chaos

The first fuzz found crashes. I fuzzed lint with junk agent names and judge settings (kit/fuzz_judge_as_solver.py): lists, dicts, numbers and booleans as agent_name, user_agent_name and user_sim, three judge types, and junk use_agent_judge. Across 3,000 cases, lint raised TypeError: unhashable type in 193.

After the fix. A name that isn't a string names no agent. Five seeds then ran 15,000 cases: 2,420 built, 45 flagged, 0 crashes.

Docs

For FD-6446, the docs spike:

  • add judge-as-solver to lint's rules: a judge must not run in the agent under test;
  • the fix is to leave agent_name unset, or to name a separate judge agent.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Adds judge-as-solver as a lint error when an agent judge shares the solver's agent.

  • Lint flags a rubric judge that runs in the solver’s agent.
  • Task tools now agree on which prompted agent is the solver.
  • Tests pin the failed grade when a judge runs out of retries.

No actionable issues were found in the changes since the previous review or the full-PR rule check. No previous review threads were supplied. Tests were not run during this review.

Reviews (7) · Last reviewed commit: "refactor(bundle): played_deploys and the..." · Reviewed by Greptile

An agent judge whose agent_name names the agent a step prompts as the agent under test grades the solver's own work,
and posts its own model and settings to that agent first. Lint now refuses it (judge-as-solver), as training already
did; --skip-lint runs it anyway. solver_agents, beside user_sim_agents, is the one definition of the solver's agents:
solver_steps, the lint rule and training's check read it, and a name that isn't a string names no agent, so lint
answers rather than crashing on one. Tests also pin that a judge out of retries writes a failed grade.

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 05:32
…_agents, and one agent_name_of names a step's agent

played_deploys was a fourth copy of the solver's agents, and the harness's first-prompt pick a fifth; both now read
solver_agents. agent_name_of is the one fallback to the default agent's name, for solver_agents, solver_steps,
played_deploys and the harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 7287237 into main Nov 23, 2026
59 of 60 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-5929-g13-judges-record-how-they-ran branch November 23, 2026 16:07
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