anomalyco / anomalyco/opencode

One unreachable well-known origin hides every other integration

Open
#46,187 0 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 29, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

If one origin in wellknown:sources stops resolving, every other one is lost too.

WellKnown.load() resolves origins with a fail-fast Effect.forEach, so a single unreachable origin fails the whole batch. opencode.wellknown calls that via Effect.orDie (packages/core/src/wellknown/plugin.ts:13), so the plugin dies before registering its transform and no well-known integration gets registered. Config.loadWellknown catches the same failure and substitutes [], so the remote config for the healthy origins disappears at the same time.

The auth error is misleading, because wellknown.add only fetches the one origin you passed and genuinely succeeds:

◇  Authentication provider discovered
■  Integration not found: https://opencode.example.com

It only shows up after a restart. load() reuses the in-memory cache, so a long-running service keeps working until it cold-loads — which makes it look like whatever version you just installed caused it.

I hit this when a teammate's preview deployment was torn down while still listed in my sources.

OpenCode version

0.0.0-beta-18684

Steps to reproduce
  1. bun run packages/core/script/wellknown-server.ts (listens on 127.0.0.1:8787)
  2. opencode2 auth login http://127.0.0.1:8787 --standalone --method __probe__ — resolves fine, reports Available: login
  3. Add an origin that does not resolve:
    sqlite3 ~/.local/share/opencode/opencode.db \
      "UPDATE kv SET value=json_insert(value,'\$[#]','https://dead-preview.invalid') WHERE key='wellknown:sources';"
    
  4. Repeat step 2 → Integration not found: http://127.0.0.1:8787

Removing the dead origin restores it. There's currently no command to do that — WellKnown.remove() exists but nothing reaches it, so wellknown:sources only grows.

Operating System

macOS 26.0.1

Terminal

Ghostty

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.