Repository navigation
fix(always_on): the judge reads the model's thinking only when the task's filter keeps it - #980
Merged
Conversation
…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>
This was referenced Dec 2, 2026
…g in raw turns, and match the generic path under SCREENSHOT Review fixes on #980: - A turn in a format the staging can't break into events (native OpenCode) is staged as recorded, reasoning included, whatever the filter says. The judge's note no longer claims the files hold no thinking: it names those wakes, and the entry does too (trajectory_staging.thinking_unfiltered_wakes). - keeps_thinking: a SCREENSHOT filter's include_* flags don't apply, so it leaves the thinking as recorded, as the generic path hands an agent judge the raw trajectory. Its docstring now names the readers that ask it and the ones that pass thinking through unfiltered. - The staged files read only include_thinking and compaction_type from the filter; any other setting set away from its default is logged, and the docstrings say so. trajectory_staging.thinking_shown is always recorded. - StagedRun exposes thinking_shown and unfiltered_wakes, so the note reads the staging's own decision instead of computing it a second time. - The note's thinking words are one clause, not a second parenthetical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng only when its filter sets include_thinking: true An always_on judge grades what the assistant did and said, not what it thought. Its staged files now carry thinking only for a DEFAULT trajectory filter that sets include_thinking: true (always_on_staging.stages_thinking). No filter, a filter that doesn't set it (as PSI's always_on tasks store theirs), or a SCREENSHOT filter all stage none. The generic path is unchanged: keeps_thinking still shows a judge with no filter the trajectory as recorded, and its docstring now says always_on doesn't use it. thinking_shown is still recorded on every entry. The judge's note for a turn staged as recorded (an unknown format) now says any thinking in it is not evidence. Goldens re-recorded where this changes them, all four always_on cases: judge_inputs.json (always_on_staged, always_on_atif_staged: smaller wake and events files, the note's left-out wording) and rubrics_subclasses.json (ao_staged_with_what_its_judge_read, ao_context_loss_the_gate_fails: thinking_shown false, thinking_left_out 4, staged_bytes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AhmedArifK
approved these changes
Dec 2, 2026
williamloo-scale
approved these changes
Dec 2, 2026
…lter One conflict, in always_on_staging.py, resolved to keep both sides: - the module docstring: #980's thinking only when the judge's filter asks for it (stages_thinking), with #933's harness note for a failed wake (``failure``); - the imports: #980's trajectory_filter import beside #933's turn_events import with is_infra_failure; - _Stager's fields: #980's thinking, thinking_left_out and as_recorded beside #933's harness_failures; - the staging record: #980's thinking_left_out and thinking_unfiltered_wakes beside #933's harness_failures. Everything else merged cleanly; src/agent_env/task (Task.retry_config_of and the implied retries) is main's as is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lter Two conflicts, both in module docstrings, resolved to keep both sides: - always_on_agent_verifier.py: #980's paragraph on the strict thinking rule (stages_thinking) stays, followed by #981's paragraph on wakes with no stored trajectory and _judges_without_trajectory. - always_on_staging.py: the wake file list keeps #980's "thinking when ... the judge's trajectory filter asks for it (stages_thinking)" and adds #981's turn_failed line. The code of both merged cleanly: #981's failed-turn judging, its no-trajectory rule and turn_failed lines, beside #980's stages_thinking, the settings warning and the files note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sarah-chitty-1
deleted the
sarahchitty/always-on-judge-thinking-filter
branch
December 3, 2026 00:35
sarah-chitty-1
added a commit
that referenced
this pull request
Dec 3, 2026
Conflicts, each resolved so #980's thinking filter, #981's failure notes and this branch's guard notes and line-limit guarantee all survive: - always_on_staging.py: the module docstring says a turn's thinking is staged only when the judge's filter asks for it (stages_thinking) and that a harness_note can carry failure or guard; the stager keeps #980's thinking, thinking_left_out and as_recorded beside guard_actions and shown; the record keeps thinking_left_out and thinking_unfiltered_wakes beside context_guard_actions and results_shown_not_whole. - test_always_on_staging.py: imports both TrajectoryFilter (#980) and TurnEvents (this branch). - tst/data/verifier_golden/judge_inputs.json: always_on_staged and always_on_atif_staged re-recorded on the merge. Against main they differ only by this branch's text: the prompt by 198 characters (the files note's preview and line_file sentence, "at most the first 300") and index.md by 163 (its header sentence). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order. #933 and #981 are merged, and
mainwith both is merged into this branch. Their overlap inalways_on_agent_verifier.pyandalways_on_staging.pyis resolved so both survive: #981's failed-turn judging and no-trajectory rule, and this PR's thinking rule. Nothing else needs to merge before this one.What
On always_on runs, the 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 anassistant_thinkingline. 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
include_thinking: true(always_on_staging.stages_thinking). The filter is resolved as the generic path resolves it,user_overrides.apply_trajectory_filterincluded.stage_run) drops thinking otherwise and counts what it left out (thinking_left_out). The entry always says whether the thinking was shown (trajectory_staging.thinking_shown).always_on_agent_verifiertells the judge that the files leave the thinking out.include_thinkingandcompaction_typefrom the filter and nothing else. Any other setting that isn't at its default (include_tool_calls,include_response,action_log_max_lines, …) is logged as not applying.trajectory_staging.thinking_unfiltered_wakes).judge_utils/trajectory_filter.keeps_thinking()is the generic DEFAULT compactions' rule (OTel, atif/1): with no filter the judge reads the trajectory as recorded. always_on doesn't use it.Default
For an always_on judge:
include_thinking(its default isfalse): no thinking.include_thinking: true.include_thinking: true: thinking, as recorded.Existing tasks this changes. All 18 PSI always_on tasks on the hub that I checked (
psi-ts-*, in use today) have 45 always_on verifiers between them. 31 set atrajectory_filterand 14 (end-state judges, pluspsi-ts-money-checkup's process judge) set none. None setsinclude_thinking: true. So after merge, no PSI always_on judge sees the model's thinking, where today they all do when the model records it. Scores can move either way, as in the audit.psi-ts-craftweb-holiday-rush-always-on-2has criteria a judge may have graded from thinking:cheap_traps,ruled_out_baysideandruled_out_aroma_lane(why it ruled a supplier out, on its own), andforecast, whose policy credits "its working". When the model gave its reason or forecast only in its thinking, those now fail. The PSI authoring guide's "the agent's thinking reaches the judge only when its trajectory recorded it" needs updating too.Tests
include_thinking,include_thinking: false, a SCREENSHOT filter (with or withoutinclude_thinking) and an override that drops the filter all give judge files with noassistant_thinkinglines.include_thinking: truekeeps them. The no-filter, SCREENSHOT and dropped-filter cases fail on the previous head.ruffis clean. The 6 failures intask_step+clialso fail on main.judge_inputs.json:always_on_stagedandalways_on_atif_staged, with smaller wake and events files and the note's left-out wording.rubrics_subclasses.json:ao_staged_with_what_its_judge_readandao_context_loss_the_gate_fails, withthinking_shown: false,thinking_left_out: 4and a smallerstaged_bytes.Not in this PR
Raw turns aren't filtered: an unknown format's reasoning stays in its
trajectory_itemlines, and the judge is told it isn't evidence. OpenHands and pi may be staged raw too; that's untested.🤖 Generated with Claude Code
Confidence Score: 5/5

The PR appears safe to merge; no actionable new issues were found.Summary
Always-on judges now receive thinking only when a DEFAULT
trajectory_filterexplicitly enablesinclude_thinking.sarah-chitty-1 explicitly accepts that unknown formats retain thinking; the judge is told not to use it as evidence.
Reviews (9) · Last reviewed commit: "Merge origin/main (#981) into sarahchitt..." · Reviewed by Greptile