Repository navigation
feat(opencode): upgrade opencode_agent to OpenCode 1.19.6 and 2.3.2 - #6456
Conversation
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…nges Review fixes for the OpenCode 1.19.6 / 2.3.2 upgrade: - Pin opencode_version 1.17.11 where results or shipped assets are tied to it: the deprecated opencode_sandboxed_agent base config (its code default still follows opencode_agent's), DeepSWE (offline sandbox, operator-staged 1.17.11 binary), Partner IF's SWE agent (its score contract names 1.17.11), the Agentic-VBench training entry (1.19.6 renames the compaction summary sections vllm_model checks) and the opencode_search example. - OpenCode 2: write compaction.background false. 2.3.1 turned background summaries on by default; each Gym run is its own process, so a held summary is lost. 2.2.7 ignores the key. - Pin the 1.17.11 release digests, so explicit 1.17.11 downloads are checked. - Separate the request-sampling releases from the releases whose error reports were checked, and say what each list means. - Name the requested and found versions in the installer's mismatch error. - README: what changes with the new default (migration of self-supplied binaries and bundles, host CLI, sha256sum, 1.19.6 retry cap, Qwen sampling defaults, compaction, 25 MiB image bound, 300 s provider timeouts) and the OpenCode 2.3.x differences (background subagents and compaction). - Fern: match the other harness rows' token-capture wording. - Tests for the release digests, per-release install arguments, sampling gate, untested-release warning and the compaction key. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 81f0a9e |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
No qualifying issues found. I reviewed every changed file and traced the affected installation and session paths through their callers and tests. The explicit 1.17.11 pins keep fixed-runtime recipes on their qualified release, and both OpenCode 2 launch paths disable background compaction.
This was a static review. I did not execute tests or independently verify upstream release assets. The PR reports representative real-model runs, with OpenCode 2.3.x subagents and compaction explicitly outside that evidence.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
…e-v1-v2 Resolve conflicts with main's checkpoint/resume (#5268) and task-container (#5458) work: - app.py: keep main's _reported_model_error signature (reprompted) with the _CLASSIFIED_OPENCODE_VERSIONS docstring; take main's _install_session_files call and pass the release digests for every pinned version there, as the PR did inline. - README.md: OpenCode 2 prints v2.3.2, plus main's task-container sentence. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test a102593 |
|
One issue from a local review (with a repro test):
Both envs run the local path. There a nonzero OpenCode exit is only logged ( Suggestion: on the local path, treat a nonzero exit as a failed run, the way the sandbox path already does ( Repro: a stand-in |
A local OpenCode run that exited nonzero was only logged, so its response reached /verify as an ordinary completed one. With 1.19.6 capping model-call retries at five, an endpoint outage longer than about a minute was scored as the model's 0 in the local recipes (opencode_math, opencode_reasoning_gym). Classify the exit the way a sandbox session does: a provider failure OpenCode recorded fails the response with its HTTP status and outcome, any other nonzero exit fails it with an unknown cause, and a context overflow leaves it incomplete. The legacy relay verifies only what the agent outcome policy grades; anything else fails the rollout with HTTP 502 and no reward. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 0f84782 |
|
Thanks, fixed in 0f84782. A local run is now classified the way a sandbox session classifies its run:
Your repro is now |
Signed-off-by: svcnemo-autobot <[email protected]>
|
/ok to test 9f8c76e |
Summary
Upgrade
opencode_agent's default OpenCode 1 CLI from 1.17.11 to 1.19.6. Select 2.3.2 explicitly withopencode_version: "2.3.2", replacing 2.2.7 as the supported OpenCode 2 pin. The sandbox installer receives the upstream SHA-256 of each Linux x64-baseline and arm64 asset, glibc and musl, for 1.19.6, 2.3.2 and now also 1.17.11, so every pinned release download is checked. The v1 host installer uses the exact npm version and the v2 host installer checks the release archive and executable version.Unpinned configs follow the current upstream releases. Both generic OpenCode training examples inherit the shared default. Recipes that ship a fixed CLI or plugin bundle, or whose recorded results depend on 1.17.11, pin it. The old v2 download digests and 1.17.11 request sampling remain available for explicit pins. An upgrade of those benchmark images would need its own qualification. No separate issue is needed for this routine update to the two release lines introduced in #6001.
Review fixes (November 19)
opencode_sandboxed_agent/configs/opencode_sandboxed_agent.yamland the opencode_search example. The deprecated agent's plugins and stable-date capture were checked on 1.17.11; its code default still followsopencode_agent(fix(opencode): share runtime pin and observability patch #4288).benchmarks/deepswe/opencode.yaml: an offline sandbox with an operator-staged 1.17.11 binary.partner_if_swe_agentblocks: the benchmark's score contract names 1.17.11.environments/harbor/agentic_vbench_train/harbor_train.yaml: 1.19.6 renames the compaction summary sections thatvllm_model's summary check expects.compaction.background: false. 2.3.1 turned background summaries on by default; they run in extra model calls and are held by a process that each Gym run ends. 2.2.7 ignores the key.Review fixes (November 24): local runs that exit nonzero
With 1.19.6 capping model-call retries at five, an endpoint outage longer than about a minute ends a local OpenCode run with exit 1. The local path only logged the exit, so
opencode_mathandopencode_reasoning_gymscored the outage as the model's 0. A local run is now classified the way a sandbox session classifies its run, and the legacy relay verifies only what the agent outcome policy grades.flowchart LR A["local OpenCode run<br/>ends on its own"] --> B{"last assistant<br/>message"} B -- "APIError" --> C["failed<br/>HTTP status + ng_agent_outcome"] B -- "ContextOverflowError" --> D["incomplete"] B -- "none, exit != 0" --> E["failed<br/>outcome unknown"] B -- "none, exit 0" --> F["completed"] C --> G{"legacy relay:<br/>outcome policy"} E --> G G -- "verify (400, 413, 422)" --> H["/verify"] G -- "retry or fail (5xx, transport, unknown)" --> I["HTTP 502<br/>no reward"] D --> H F --> H classDef new fill:#fff3b0,stroke:#b59f00,color:#000 class B,G newA timeout keeps its existing handling.
Compatibility
opencode_versionnow runs 1.19.6. Its scores are not comparable with earlier runs. These presets move:opencode.yaml);terminal_bench_2_1/opencode);opencode_agentconfigs;environments/opencode_mathandenvironments/opencode_reasoning_gym.opencode_versionto that release. This coverssandbox_executable_path, an image runtime, andsandbox_plugin_dependencies_path. Setup refuses an executable that reports another version.opencodeon PATH reports another version. Upgrade it or pin the version it has.sha256sumin the image.top_pfor Qwen model IDs, which changes sampling in the two Qwen-based environments above unless the model server sets it;opencode runstill waits for them;Runtime and trajectory evidence
Final head, real model, stock verifier. Terminal-Bench 2.1
regex-logran through the shippedterminal_bench_2_1/opencodepreset (gym eval run --sandbox docker --model-type openai_model --only-tasks regex-log --num-repeats 1, model-call capture on). The Harbor environment server lent the task image to the agent session and graded it with the task's own tests after close. The model was hostednvidia/nemotron-3.5-super-vl-120b-a12b.opencode_version: "2.3.2"opencode_version: "2.3.2", repeatopencode_version: "1.17.11"(main's default)opencode_version: "2.2.7"(main's v2 pin)alpine:3.20lackslibstdc++, which all three musl builds need, the same as 1.17.11. Withlibstdc++andlibgccadded, the x64-baseline-musl builds of 1.17.11, 1.19.6 and 2.3.2 passed their digests and printed their versions.November 18 paired tool and training checks (signed commit
ce0e9f8673). Each row used a fresh Docker sandbox, the Gym agent-session route and its rollout-scoped Responses route, and session close. The settings were hostednvidia/nemotron-3.5-super-vl-120b-a12b, temperature 0, top-p 1, thinking off, and a 4,096-token per-call limit. Only the input file contained the three operands. An independent host-side verifier read the answer file before close.1.17.111.19.6opencode v2.2.7opencode v2.3.2readreturned 137, 284, and 59 from/app/parts.txt.writecreated/app/answer.txtwith480, and the final model reply was480.filePath; v2 usedpath.A separate GPU run on each updated pin used
Qwen/Qwen2.5-0.5B-Instructwith Gym's training-token route. Both replied2. Every element in the Gym token ledger equaled the sampler's original arrays (v1: 3,146 prompt IDs, 2 generated IDs, 2 log probabilities; v2: 1,344 / 2 / 2).Terminal-Bench 2.1 smoke A/B (November 20). This is in place of the full 89×8 evaluation. Each version ran 12 tasks once through
terminal_bench_2_1/opencodeat81f0a9efa3. The tasks were picked for small images:regex-log,adaptive-rejection-sampler,merge-diff-arc-agi-task,sqlite-with-gcov,count-dataset-tokens,log-summary-date-ranges,openssl-selfsigned-cert,sqlite-db-truncate,gcode-to-text,kv-store-grpc,sparql-universityandcancel-async-tasks. The runs used the same hosted model and Docker sandboxes, at concurrency 6; 2.3.2 ran at 3 because the workstation disk was low.adaptive-rejection-samplerandkv-store-grpc) and solved nothing fewer.count-dataset-tokensand failedadaptive-rejection-sampler, compared with 2.2.7.MessageAbortedError, which reaches the Environment Server as a 502 (environment_server_failed).gcode-to-textandcancel-async-taskson 2.2.7, andgcode-to-texton 2.3.2.These checks do not cover:
Validation
All checks ran on the final head on a Linux workstation.
pre-commit run --all-filespassed with no file changes.cd fern && npm run check -- --warnings: 0 errors and 1 warning. The redirects check was skipped without authentication.GYM_TEST_OPENCODE_BINARY:pytest -n 8 responses_api_agents/opencode_agent/tests responses_api_agents/opencode_sandboxed_agent/tests tests/unit_tests/models/test_token_capture_harness_notes.py tests/unit_tests/test_session_contract_repo.py tests/unit_tests/benchmarks tests/unit_tests/tooling/test_agent_environment_repository_configs.py.test_babyvision_opencode_prepare.pyneeded Pillow and passed in the next run.--import-mode=importlib):pytest tests/unit_tests/benchmarks/test_babyvision_opencode_prepare.py resources_servers/agentic_if/tests/test_config.py resources_servers/agentic_if/tests/task_variants/test_builtin_schema_snapshot.py benchmarks/agentic_if/tests/test_benchmark_config.py resources_servers/equivalence_llm_judge/tests/test_hle_diamond.py responses_api_agents/pi_agent/tests/test_offline_science_presets.py resources_servers/opencode_search/tests resources_servers/visual_coding_opencode/tests/test_opencode_session.py environments/pdf_analyst_qa/tests/test_dataset.py benchmarks/terminal_bench_2_1/tests resources_servers/mm_coding_training/tests/test_catalog.py resources_servers/mm_coding_training/tests/test_review_regressions.py resources_servers/deepswe_external1/tests/test_config.py resources_servers/swebench_pro_v2/tests/test_prepare.py responses_api_agents/vibench_agent/tests.test_nooa_terminal_bench_2_1.py's NOOA and Pinum_workersassertions. They fail the same way onmainat240fedc348.opencode, for the right architecture and libc.max-steps.tsis the same blob at all four tags.🤖 Generated with Claude Code