Appended to /etc/hosts (Linux) or C:\Windows\System32\drivers\etc\hosts (Windows):
# >>> opencode-privacy-block BEGIN >>>
127.0.0.1 app.opencode.ai
127.0.0.1 models.dev
127.0.0.1 opncd.ai
127.0.0.1 api.opencode.ai
127.0.0.1 opencode.ai
# <<< opencode-privacy-block END <<<
What each domain does (click to expand all 5)
app.opencode.ai — Web UI catch-all proxy NO DISABLE FLAG
Source: server.ts:499-514
When you run opencode serve, every request that doesn't match an API route is silently forwarded:
.all("/*", async (c) => {
const response = await proxy(`https://app.opencode.ai${c.req.path}`, {
...c.req,
headers: { ...c.req.raw.headers, host: "app.opencode.ai" },
})
})
When it fires: On every page load of the web UI — HTML, JS, CSS, fonts, images. Even if your LLM is fully local.
Leaked: Your IP, your operating system (via User-Agent header), all request headers, full URL path (may contain project names).
NOT leaked: Prompts and LLM responses — handled by API routes registered before this catch-all.
Why this matters even if prompts aren't leaked
- Web UI is fetched remotely, not embedded. Developers can change it without a binary update.
- Your IP is exposed to OpenCode's CDN on every page load.
- Request paths may contain project names.
- In air-gapped networks, the web UI fails with a blank page.
api.opencode.ai — GitHub integration NO DISABLE FLAG
Source: github.ts:366, 738
fetch(`https://api.opencode.ai/get_github_app_installation?owner=${app.owner}&repo=${app.repo}`)
if (!value) return "https://api.opencode.ai"
When it fires: Only with opencode github command. Not during normal chat/TUI.
Leaked: GitHub org name, repo name, and OIDC tokens (OpenID Connect tokens — temporary login credentials that prove your identity. If intercepted, they could be used to act as you for a short time).
opencode.ai — Auto-update HAS DISABLE FLAG
Source: installation/index.ts:153
const response = yield* httpOk.execute(HttpClientRequest.get("https://opencode.ai/install"))
When it fires: Periodically in the background, unless OPENCODE_DISABLE_AUTOUPDATE=true.
Leaked: IP, operating system/platform (the endpoint serves platform-specific install scripts, so the request itself reveals your OS), and OpenCode version.
opncd.ai — Session sharing HAS DISABLE FLAG
Source: share-next.ts:50, 66-112, 191-228
Subscribes to every session/message/part/diff event:
Bus.subscribe(Session.Event.Updated, async (evt) => { await sync(...) })
Bus.subscribe(MessageV2.Event.Updated, async (evt) => { await sync(...) })
Bus.subscribe(MessageV2.Event.PartUpdated, async (evt) => { await sync(...) })
Bus.subscribe(Session.Event.Diff, async (evt) => { await sync(...) })
But sync() has a critical gate:
async function sync(sessionID, data) {
if (disabled) return // ← exits if OPENCODE_DISABLE_SHARE=true
const share = get(sessionID)
if (!share) return // ← exits if no share record exists
// ...only then does the HTTP POST happen
}
When data is actually sent vs. when it's not
Data IS sent when ALL true:
OPENCODE_DISABLE_SHAREis nottrue- Session has a share record (
ShareNext.create()was called) - A session/message/part/diff event fires
Data is NOT sent when ANY true:
OPENCODE_DISABLE_SHARE=true— no bus subscriptions created at all- Session never shared —
sync()bails atif (!share) return
What is sent: Full session metadata, complete messages, all parts (tool calls, code), file diffs, model info.
Bottom line: If you never explicitly share a session, no data is actually sent to opncd.ai. However, the code that listens for your activity (every message you send, every file you edit) is still running in the background — it just discards the data instead of sending it. Setting OPENCODE_DISABLE_SHARE=true prevents even that listener code from being activated in the first place, so nothing about your session is ever monitored at all.
models.dev — Model catalog HAS DISABLE FLAG
Source: models.ts:84-99. Fetches only if local cache AND bundled snapshot both fail.
Leaked: IP and that you're using OpenCode. Does NOT report which model you selected.
us.i.posthog.com and api.honeycomb.io — NOT in the CLI binary
Correction: PostHog and Honeycomb references exist in the OpenCode repository, but they are not part of the CLI/TUI binary that users run.
us.i.posthog.com appears in script/stats.ts — a standalone CI build script that aggregates download stats. It requires a POSTHOG_KEY env var and is run by developers in CI, not by users.
api.honeycomb.io appears in packages/console/function/src/log-processor.ts — part of the cloud console web app (their dashboard), not the CLI. It requires a server-side HONEYCOMB_API_KEY.
Neither of these endpoints is contacted when you run opencode on your machine. They are not blocked by this fix because they don't need to be.