Skip to content

fix(opencode): add a flag to skip the config dependency install - #208

Merged
reformedot merged 3 commits into
mainfrom
skip-config-install
Dec 4, 2026
Merged

reformedot merged 3 commits into
mainfrom
skip-config-install

Conversation

@reformedot

@reformedot reformedot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

At each start, bcode installs @opencode-ai/plugin@<bcode version> in each config directory. A release build asks for a version that does not exist on npm, such as 0.1.21-bu4-family.1. So the install always fails, but first it downloads the full version list of the package: 27.7 MB, 3.4 MB compressed.

In the cloud, each agent sandbox starts with an empty cache and has 2 config directories. A production flow log (2026-12-03, 34 minutes) shows 2,412 of these downloads, 8.5 GB. That is about 13% of the NAT gateway traffic, about 600 USD per month.

What

OPENCODE_DISABLE_CONFIG_INSTALL=1 skips this install of the server config. Without the variable, nothing changes. The separate install of the TUI config stays, because bcode serve does not load it.

The cloud worker sets the variable after it uses a bcode release with this change.

Proof

  • New test: the install runs without the variable and does not run in any config directory with it. The test fails when the guard is removed.
  • Real start from source with an empty home: 117 MB npm cache without the variable, no npm cache and no node_modules with it.
  • bun run typecheck passes in packages/opencode and packages/core.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

…irectory

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/opencode/src/config/config.ts Resolved
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@reformedot
reformedot merged commit 9959c1c into main Dec 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant