Repository navigation
feat(pi): upgrade the coding agent to 1.5.2 - #6454
Conversation
Signed-off-by: yaoyu-33 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
… 1.x Local setup now runs the configured command with its environment overrides to check an exact pi_version, skips the check for latest or npm ranges, and turns a failing or hung version command into the setup error with its output. The renamed host toolchain prefix, lock and record are git-ignored. Comments, the README and the harness guide no longer describe 0.80.2-specific behavior, and the README notes the output cap that Pi 1.x sends itself. Tests seed the real-Pi sessions with the pinned version, cover a cut-off finish call with parsable arguments (Pi 1.x refuses the calls of a length reply itself), pin Pi's retry policy in the compaction test, and cover the installer's .bin/pi probe and the new local setup branches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…f replies
Pi 1.x appends the cause to a connection error ("Connection error.: connect
ECONNREFUSED ..."), so classify_outcome now matches the prefix and keeps such
failures typed as model transport errors.
Pi 1.x also compacts and retries a length reply cut below the output cap. When
that compaction call fails, the run now fails as the compaction call did,
retryable by default, instead of grading the cut-off reply.
Pi's bundled entry script enables Node's compile cache, which left files in
the task sandbox's /tmp: Gym now disables it for the Pi run, the runtime check
and the installer's version check. The installer passes --bin-links so a task's
npm config cannot drop the .bin/pi link that Gym runs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
… typing DeepSearchQA and WideSearch run the Pi adapter of the Gym commit that their setup_command installs in the sandbox. That adapter predates Gym's Pi 1.x handling, so these two presets stay on 0.80.2 until setup_command moves to a Gym commit that has it. The pinned-Pi HTTP error test now also checks that the adapter types the pinned Pi's error message as a model request error with its status. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test bf5dfd0 |
…ironments Pi 1.x sends each call's cap itself: the provider model's maxTokens, 16384 when unset, fitted to its contextWindow, 128000 when unset. Pi 0.80.2 sent no cap. pi_math and pi_reasoning_gym now declare their models' native 262144-token context and the model cards' output lengths: 81920 for Qwen3.5-397B-A17B on competition math, 16384 for Qwen3-Next-80B-A3B-Instruct. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 0503090 |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
RISK: Provide the required Terminal-Bench 2.1 upgrade comparison.
The PR explicitly lists a full Terminal-Bench 2.1 before/after evaluation as unvalidated. This upgrade changes the shipped Pi pin used by the benchmark's documented Pi pairing, so that supported pairing moves to 1.5.2 without the required qualification evidence. The trusted harness-upgrade guidance requires the complete benchmark with eight repeats before and after an upgrade; the reported file-task and math smokes do not meet that requirement.
Could you run Pi 0.80.2 and 1.5.2 against the same pinned Terminal-Bench 2.1 revision and real model, keeping prompts, sampling, budgets, provider, task images, verifier and concurrency fixed apart from the harness version? Keep golden-patch mode disabled and retain the existing representative smokes as separate evidence. No score-equality requirement is implied, but explain score and failure shifts.
Acceptance evidence: account for all 89 tasks × 8 repeats, 712 expected outcomes per version, without smoke-only filters. Report attempted, graded and missing counts, aggregate scores with denominators, per-task rewards, and incomplete or failed evaluations. Separate known task/verifier failures and infrastructure failures from valid zero rewards. Link the resolved configurations, commands, rollouts, verifier outputs, failure sidecars, quality_summary.json and saved-rollout evidence-check results. This is a validation gap, not a demonstrated production failure.
NOTE: The inline finding concerns inconsistent invocation-status evidence after a failed cut-off recovery. The response's retry classification is already handled correctly.
I reviewed all 30 changed files and traced the affected launch, outcome and configuration paths. This was a static review; I did not execute tests or independently reproduce the reported rollouts.
Inline comments (escaped v1):
-
responses_api_agents/pi_agent/app.pyline 1303: NOTE: Reconcile invocation status after a failed cut-off recovery.A final assistant
lengthreply followed byagent_endand a failed overflow compaction now produces a failed response through the new recovery branch. However,_build_pi_observations()maps that lastlengthreply to invocation status"incomplete". This reconciliation block excludes errors, and close returns those observations unchanged. The response correctly reports the provider failure, but its invocation evidence still describes a limit stop.Could you reconcile this recognized compaction failure too? Replace the block at lines 1303–1306 with:
if (compaction_failure is not None and error) or (incomplete and not error): for record in state.observations.records: if isinstance(record, AgentInvocation): record.status = "failed" if error else "incomplete"
This makes the invocation agree with the failed recovery without changing response classification. It keeps ordinary length limits and timeouts incomplete, successful recovery completed, and successful finish-tool completion unchanged. Verify this suggested code before adopting it.
Proposed acceptance checks, not executed: extend the cut-off recovery test to assert one invocation with status
"failed"after summary HTTP 503 and"completed"after HTTP 200. Retain"incomplete"when recovery succeeds but the retried call overflows in the context-limit test, and retain the existing finish-tool assertion that the invocation is completed.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
|
/ok to test 09bc707 |
Port the Pi 1.x launcher path (.bin/pi), NODE_DISABLE_COMPILE_CACHE and the compaction-failure classification of cut-off replies into main's _sandbox_payload/reported_error refactor, and update the Pi pin named in the harness guide, the pi_agent README and the DeepCAD harness table. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 5e4a195 |
Resolve the job_bench and workspace_bench Pi presets, which main moved to pi_agent at 0.80.2, to main's blocks at this branch's 1.5.2 pin, and keep main's HLE-Diamond README text with the 1.5.2 pin. Main's Agentic-VBench overlay test checks the shipped pin, so it now expects 1.5.2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…ails When Pi's compaction call fails while it recovers a reply cut off at the length limit, the response already fails as that call did, but the invocation record kept the `incomplete` status of the cut-off reply that Pi's events end on. The record now takes the response's status in that case too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 93cc4b6 |
main's Pi adapter targets Pi 1.x since #6454, and a 0.80.2 runtime runs only with the adapter of an earlier Gym commit. Pin the version the adapter now expects, and build the runtime at that version. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
What
Upgrade Gym's Pi harness (
@earendil-works/pi-coding-agent) from 0.80.2 (0.85.1 in the offline science image) to 1.5.2, and adapt the Pi adapter to what 1.x changed. Release · npmWhy
Pi has published no 0.x release since 1.0.0, so staying on 0.80.2 means getting no fixes. Pi 1.x also moves its CLI, changes its error text and recovers cut-off replies by itself. Without matching adapter changes, transport failures are mistyped and a failed recovery is graded as if it were an answer.
How
dist/bundle/cli.js.bin/pilink; the installer forces--bin-linksConnection error.: connect ECONNREFUSED …)model_transport_errorlengthreply cut below the output cap/tmppi_mathandpi_reasoning_gymdeclare their model cards' limits: 262144 window, 81920 / 16384 outputcommandreports an exact pinPi 1.5.2 scores are not comparable with 0.80.2 or 0.85.1 runs:
AI_AGENT=piandPI_*variablesoutput_token_policy: fixedit can drop to 1 token near a full windowlengthreply are not run; a retried reply stays in the output before its replacement"x"becomes["x"]Compatibility:
bakedimages, prebuilt runtime archives, and/tmp/nemo-gym-pi-node-22.19.0-1.5.2. A host whosepireports a version other than an exact pin now fails local setup; upgrade it withnpm install -g @earendil-works/[email protected](needs Node 22.19.0 or later).npm-shrinkwrap.json, so installs other than the offline image resolve Pi's dependencies at install time.setup_commandinstalls, so they stay on 0.80.2 until they leaveharness_exa_search(feat(tavily_search): add Exa as a search provider and move the DeepSearchQA and WideSearch session harnesses onto it #5827).swe_atlas_qa/pi.yamlhas no pin, andskill_triggeruses Harbor's Pi agent.Issue: none; this is a self-contained dependency upgrade. Rollout evidence: with a hosted model on Pi 1.5.2, an agent-session smoke and a shipped
pi_mathrun each scored 1.0. No Terminal-Bench 2.1 before/after evaluation has been run.🤖 Generated with Claude Code