Repository navigation
fix(claude-code): keep reasoning out of evaluation answers - #5829
Open
linj-glitch wants to merge 1 commit into
Open
linj-glitch wants to merge 1 commit into
linj-glitch wants to merge 1 commit into
Conversation
Signed-off-by: Lin Jia <[email protected]>
Contributor
|
Please rebase to harmonize with #5955 and run tests, then I can take a look. Regarding this point: "Evaluation scores may change because reasoning is no longer injected into answers" |
This branch has not been deployed
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.
What does this PR do?
Fixes #5565.
Claude Code evaluation currently prepends thinking to assistant text, including thinking carried across tool-only turns. This sends reasoning to graders as part of the answer. Emit separate Responses
reasoningitems in evaluation and capture modes, leaving assistant text unchanged. Rename the parser switch tocapture_transcriptso it describes the remaining capture-specific behavior: subagent filtering and retaining pending calls in model order.Validation
responses_api_agents/claude_code_agent/.venv/bin/python -m pytest responses_api_agents/claude_code_agent/tests -q: 201 passed using the component's frozen dependencies, Python 3.13.14.pre-commit run --all-files: passed. Recheckedpre-commit run guardwords-checkwith the final changes staged.git diff --check: passed.Rollouts
Ran Claude Code 2.1.280 through Gym's local VLLMModel
/v1/messages, using vLLM 0.22.0 andQwen/Qwen3-1.7Bat revision70d244cc86ccca08cf5af4e1e306ecf908b1ad5e. For a task asking for 17 + 25, the actual CLI generated 299 characters of reasoning and answered42. The agent returned separate reasoning and message items; Gym'sequivalence_llm_judgereceived exactly42and returned reward 1.0 ([[A=B]]).Replaying the same CLI transcript through the previous parser reproduced the
<think>...</think>prefix in the grader's candidate answer. Capture-mode output (normalizing generated item IDs) and metadata matched between the previous and updated parsers. This was a representative local evaluation and verifier smoke, plus capture replay parity.Compatibility and benchmark impact
Evaluation scores may change because reasoning is no longer injected into answers. Consumers needing reasoning should read the separate reasoning items. Direct parser callers using
fold_thinking=Falseshould migrate tocapture_transcript=True; evaluation uses the defaultFalse. The agent README documents this migration. Capture-specific filtering, pending-call handling, usage, and terminal attribution are preserved.Checklist