Skip to content

fix(always_on): the judge reads the model's thinking only when the task's filter keeps it - #980

Open
sarah-chitty-1 wants to merge 1 commit into
mainfrom
sarahchitty/always-on-judge-thinking-filter
Open

sarah-chitty-1 wants to merge 1 commit into
mainfrom
sarahchitty/always-on-judge-thinking-filter

Conversation

@sarah-chitty-1

@sarah-chitty-1 sarah-chitty-1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

On always_on runs, the process judge read the model's thinking even when the task set include_thinking: false.

The always_on path stages its own judge files (always_on_staging.py), which wrote every thought as an assistant_thinking line. The task's trajectory filter was applied only on the generic path. A partner's audit of 246 graded runs found the judge citing the model's reasoning in up to 13 of 24 runs per model for Claude, DeepSeek, GLM, Kimi and Qwen, and never for GPT, whose reasoning is encrypted. Verdicts went both ways, crediting a model for what it only thought and failing one because a result line appeared only in its thinking.

Change

  • One rule: judge_utils/trajectory_filter.keeps_thinking(). The generic OTel path, atif/1 compaction and always_on staging all use it.
  • always_on staging (stage_run) takes the filter, drops thinking when the filter excludes it, and counts what it left out (thinking_left_out).
  • always_on_agent_verifier resolves the filter the same way as the generic path, overrides included, and tells the judge that the thinking isn't in the files.

Default

  • A task with no filter stages thinking as before, the same as the generic path.
  • A filter that doesn't set include_thinking drops it, which is the documented default.

Tests

  • New: include_thinking: false with a model that thinks gives judge files with no assistant_thinking lines; true keeps them. With the change reverted, both leak cases fail.
  • 1490 verifier and always_on tests pass, and ruff is clean. The 6 failures in task_step + cli also fail on main.

Not in this PR

Native OpenCode traces are staged raw, reasoning included. OpenHands and pi may be the same; that's untested.

🤖 Generated with Claude Code

Confidence Score: 5/5RetriggerView in Greptile

The PR appears safe to merge.

Summary

Makes always-on judge files follow include_thinking, using the same rule as OTel and ATIF compaction.

  • Always-on judges see thinking only when their filter allows it.

Reviews (1) · Last reviewed commit: "fix(always_on_agent_verifier): stage the..." · Reviewed by Greptile

…en the judge's trajectory filter shows it

On the always_on path the judge reads files always_on_staging builds itself, and those carried every recorded
thought as an assistant_thinking line whatever the task's trajectory_filter said: include_thinking was applied
only on the generic path's compaction. A task that set include_thinking: false had its judge read (and cite) the
reasoning of models whose thinking is recorded (Claude, DeepSeek, GLM, Kimi, Qwen), never of GPT, whose reasoning
is encrypted.

- trajectory_filter.keeps_thinking: the one rule, read by the generic path's OTel and atif/1 compaction and by
  always_on staging: no filter, the trajectory as recorded; a filter, thinking only with include_thinking.
- stage_run takes the judge's trajectory filter, resolved as the generic path resolves it (_run_values, a run's
  user_overrides.apply_trajectory_filter included); thinking it leaves out is counted in the record
  (trajectory_staging.thinking_left_out), and the judge's files note says the files don't have it.
- A task that sets no filter stages thinking as before.

Tests: a filter with include_thinking false (or a filter's default, or the apply_trajectory_filter override's)
stages no assistant_thinking line and none of the thinking text, in stage_run and through the verifier into the
judge's sandbox; true, no filter, or an override that drops the filter stages it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarah-chitty-1
sarah-chitty-1 requested a review from a team as a code owner December 1, 2026 21:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant