You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: single offline switch to disable runtime network (OPENCODE_OFFLINE) #57743
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Running opencode on airgapped/offline machines currently requires a pile of separate knobs — OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_MODELS_FETCH + OPENCODE_MODELS_PATH, .npmrc offline=true, a pre-seeded ripgrep — and still trips over paths those don't cover. Two flags the docs mention (OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_DEFAULT_PLUGINS) are no-ops in v2: they only exist in the docs.
Proposal: one explicit env switch, OPENCODE_OFFLINE=1, that makes every runtime-network feature behave as if offline:
skip the update check (same as OPENCODE_DISABLE_AUTOUPDATE)
disable the models.dev fetch (bundled snapshot / OPENCODE_MODELS_PATH still serve the catalog)
force the npm/Arborist stack to offline mode (cache-only, instant failure; explicit user npm config still wins)
skip the ripgrep download (PATH lookup only, clear error otherwise)
Explicit flag only, no auto-detection. I have a working implementation with tests ready to open as a PR if the design is acceptable (fork branch PJ-Zetier/opencode@offline-startup-bounds, commit b5bbf75) — happy to adjust naming and scope.
Thanks for the detailed proposal! You're asking for a single explicit OPENCODE_OFFLINE=1 switch that makes every runtime network feature in v2 act as offline: the update check, the models.dev fetch, npm/Arborist installs and the ripgrep download. Today that takes a set of separate knobs, and some paths still aren't covered.
You're right that OPENCODE_DISABLE_LSP_DOWNLOAD and OPENCODE_DISABLE_DEFAULT_PLUGINS are only in the docs. Nothing in the current v2 code reads them. The maintainers will consider the design. Thanks for offering the implementation.
Activity
opencode-agent commentedon Oct 21, 2026
Thanks for the detailed proposal! You're asking for a single explicit
OPENCODE_OFFLINE=1switch that makes every runtime network feature in v2 act as offline: the update check, the models.dev fetch, npm/Arborist installs and the ripgrep download. Today that takes a set of separate knobs, and some paths still aren't covered.You're right that
OPENCODE_DISABLE_LSP_DOWNLOADandOPENCODE_DISABLE_DEFAULT_PLUGINSare only in the docs. Nothing in the current v2 code reads them. The maintainers will consider the design. Thanks for offering the implementation.Related issues:
OPENCODE_DISABLE_INSTALLto skip npm installs at startup