Skip to content

feat(evals): Add --claude-judge to run the judge on the Agent SDK - #1299

Open
jirispilka wants to merge 4 commits into
feat/tasks-workflow-evalsfrom
feat/evals-claude-judge
Open

feat(evals): Add --claude-judge to run the judge on the Agent SDK#1299
jirispilka wants to merge 4 commits into
feat/tasks-workflow-evalsfrom
feat/evals-claude-judge

Conversation

@jirispilka

@jirispilka jirispilka commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1294. Lets the whole eval harness run on a Claude Code subscription login with zero API keys: --subscription (from #1294) covers the agent, --claude-judge (this PR) covers the judge.

The main motivation is to run judge from claude.ai/code so that it can run over-night.
I would like to run the judge also from claude.ai

Used to run the web-fetch/web-selection eval ladders (suites in the follow-up PR) both in a remote Claude Code sandbox (no keys available) and locally.

jirispilka and others added 4 commits August 22, 2026 20:12
The judge previously required OPENROUTER_API_KEY. --claude-judge backs
it with a short-lived Claude Code subprocess (no tools, one turn) on
the same local login --subscription uses, so a run needs only
APIFY_TOKEN and the Langfuse keys. --judge-model then takes an
Anthropic model ID (default claude-sonnet-5); run metadata records
judgeProvider. The SDK exposes no structured-output parameter, so the
verdict schema is enforced by instruction plus JSON extraction.

parseJudgeResponse also gains a prose-verdict fallback: some
OpenRouter providers answer "FAIL. The agent ..." despite the JSON
schema, and the fallback recovers the verdict without spending the
retry call (which remains the net for verdict-less answers).
- Share the Langfuse usageDetails mapping via toUsageDetails() instead of
  duplicating the spread in both LLM clients
- Compute prompt tokens once and derive totalTokens from it
- Extract the JSON object in callLlm; drop the extractJson flag threaded
  through sendRequest
- Reuse JudgeResponseValidator for the prose verdict instead of a cast
- Drop a stray eslint-disable on the node:os import
Also mention the --claude-judge path in the config docstring.
@jirispilka
jirispilka force-pushed the feat/evals-claude-judge branch from bce9bc6 to b68ef77 Compare August 22, 2026 20:41
@jirispilka
jirispilka marked this pull request as ready for review August 22, 2026 20:48
@jirispilka
jirispilka requested a review from RobertCrupa August 22, 2026 20:48
@jirispilka jirispilka self-assigned this Aug 22, 2026
@jirispilka jirispilka added the t-ai Issues owned by the AI team. label Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants