Skip to content

[Critical] Judge inherits user project .claude settings (no cwd) #3

Description

@slaFFik

Problem

src/server/judge.ts:217 spawns claude with --setting-sources project but no cwd. The judge process inherits the server's working directory — typically the user's project root — and walks up applying their .claude/settings.json, hooks, and project-scoped tool overrides.

Why it matters

  • User hooks intercept every judge call, potentially logging or mutating prompt/response.
  • Project permission rules leak into a process that is supposed to use no tools.
  • A user's .claude/settings.json defaultModel could override the judge's --model haiku.

This is silent score contamination — judge results will quietly differ between projects for reasons that have nothing to do with the variants under test.

Suggested fix

  • Set cwd on the judge spawn to a known-clean directory (the run's <run>/ folder, or os.tmpdir() for full isolation).
  • Consider passing --setting-sources user for the judge instead of project.

Source

Counselors review (all three agents flagged this).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions