Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
OpenCode makes several outbound connections that are not directly related to LLM inference:
- Auto-update checks (
opencode.ai/install)
- Session sharing (
opncd.ai)
- Web UI proxy (
app.opencode.ai)
These are fine in normal usage, but users in privacy-sensitive or restricted-network environments (corporate firewalls, VPNs, regulated industries) want a way to disable them without resorting to OS-level firewall rules or environment-variable guesswork.
Related but distinct from #2224 (which covers installation in fully air-gapped environments where even Bun package resolution fails).
Solution
Add a single offline kill switch that disables all non-essential outbound connections.
Config (opencode.json)
{
"$schema": "https://opencode.ai/config.json",
"offline": true
}
Environment variable
OPENCODE_OFFLINE=true opencode
CLI flag
opencode --offline
opencode run --offline "fix the tests"
opencode serve --offline
Behavior when enabled
| Connection |
Affected? |
Auto-update checks (opencode.ai/install) |
✅ Disabled |
Session sharing (opncd.ai) + /share command hidden |
✅ Disabled |
Web UI proxy (app.opencode.ai) |
✅ Disabled (returns 503) |
| LLM provider API calls |
❌ Not affected |
models.dev model catalog |
❌ Not affected |
| Exa web/code search |
❌ Not affected (user-initiated, already permission-gated) |
The flag also acts as a superset of the existing granular flags (OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_SHARE, OPENCODE_DISABLE_APP_PROXY) — enabling offline mode implies all of them.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
OpenCode makes several outbound connections that are not directly related to LLM inference:
opencode.ai/install)opncd.ai)app.opencode.ai)These are fine in normal usage, but users in privacy-sensitive or restricted-network environments (corporate firewalls, VPNs, regulated industries) want a way to disable them without resorting to OS-level firewall rules or environment-variable guesswork.
Related but distinct from #2224 (which covers installation in fully air-gapped environments where even Bun package resolution fails).
Solution
Add a single
offlinekill switch that disables all non-essential outbound connections.Config (
opencode.json){ "$schema": "https://opencode.ai/config.json", "offline": true }Environment variable
CLI flag
opencode --offline opencode run --offline "fix the tests" opencode serve --offlineBehavior when enabled
opencode.ai/install)opncd.ai) +/sharecommand hiddenapp.opencode.ai)models.devmodel catalogThe flag also acts as a superset of the existing granular flags (
OPENCODE_DISABLE_AUTOUPDATE,OPENCODE_DISABLE_SHARE,OPENCODE_DISABLE_APP_PROXY) — enabling offline mode implies all of them.