fix(tools): parse truncated results in execute_code - #86184
fix(tools): parse truncated results in execute_code#86184richardclawbot wants to merge 3 commits into
Conversation
|
Additional end-to-end proof with the candidate checkout and the active RTrade profile:
This confirms the parser defect directly caused the serial fallback that motivated the change. |
|
Adversarial-review findings reconciled in bdb53ce:
Proof: 40 focused tests passed; canonical clean-env runner passed; Ruff passed; diff check passed; real truncated |
Duplicate of #74100 — it implements the same execute_code trailing-hint parser, while also bundling unrelated changes. |
fix(tools): parse truncated results in execute_code The
No blocking issues. |
Summary
[Hint: ...]tool-result envelope in generated execute_code RPC clients_hermes_hinton dictionary resultsReproduction
A broad
search_filescall insideexecute_codereturned valid JSON followed by the standard truncation hint. The generated RPC client calledjson.loads(raw)and failed withJSONDecodeError: Extra data.Verification
uv run --extra dev pytest tests/tools/test_code_execution.py -q— 39 passeduv run --extra dev ruff check tools/code_execution_tool.py tests/tools/test_code_execution.py— passedgit diff --check— passedsearch_filescandidate smoke —status=success,tool_calls_made=1, output164 True TrueSafety
Only a trailing block beginning with
[Hint:is accepted. Any other trailing bytes continue to fail as protocol corruption.