feat: add skip-if-present guard to opencode harness install script (v0.1.13.dev2)#1176
Draft
feat: add skip-if-present guard to opencode harness install script (v0.1.13.dev2)#1176
Conversation
…o 0.1.13.dev2 When the OpenCode binary is pre-baked into the sandbox Docker image, the harness install script previously re-downloaded it on every rollout, negating the pre-bake benefit. This guard checks for an existing binary first and skips the download if found at \$HOME/.opencode/bin/opencode. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
build_install_script(): if$HOME/.opencode/bin/opencodealready exists, skip the download entirely0.1.13.dev2This enables Docker image pre-baking to work: when the OpenCode binary is baked into the sandbox image at build time, the harness no longer re-downloads it at rollout start, saving ~10-30s per rollout and eliminating transient GitHub download failures.
Without this guard, the pre-baked binary gets overwritten on every rollout, negating the optimization.
🤖 Generated with Claude Code