Skip to content

Authenticated providers can still appear uncached across restarts, causing connected-provider cache consumers to misfire #21097

Description

@WSXYT

Description

While using OpenCode with the oh-my-openagent plugin, I repeatedly got this warning toast inside the TUI:

⚠️ Provider Cache Missing
Model filtering disabled. RESTART OpenCode to enable full functionality.

The important part is that this happened even though providers were already authenticated and even after a full restart.

In my case the configured/authenticated providers were:

  • OpenAI (oauth)
  • OpenCode Go (api)
  • GitHub Copilot (oauth)

At the time the warning was shown, oh-my-openagent could not see a connected-provider cache yet. Later, without changing authentication, ~/.cache/oh-my-opencode/connected-providers.json was eventually created and contained:

{
  "connected": [
    "opencode-go",
    "openai",
    "github-copilot",
    "opencode"
  ],
  "updatedAt": "2026-04-05T10:36:19.218Z"
}

So the system eventually recognized the connected providers, but not reliably during the earlier startup/session state that plugin consumers depend on.

From the plugin side, the warning is emitted when the connected-provider cache file does not exist yet. The cache is built from client.provider.list(), so this looks like an upstream timing/state problem where provider connectivity is not reliably available early enough (or not consistently persisted/observable across restarts).

Related context:

  • code-yeongyu/oh-my-openagent#1635 was triaged as upstream
  • #12698 looks related, but that issue is specifically about env vars set after initialization; this reproduction used already-authenticated oauth/api providers

Plugins

oh-my-openagent

OpenCode version

1.3.15

Steps to reproduce

  1. Install and configure oh-my-openagent
  2. Authenticate providers (in my case: OpenAI oauth, OpenCode Go api, GitHub Copilot oauth)
  3. Launch opencode
  4. Send a message in the TUI
  5. Observe the warning toast:
    • Provider Cache Missing
    • Model filtering disabled. RESTART OpenCode to enable full functionality.
  6. Fully restart OpenCode
  7. Observe that the warning can still persist across restart
  8. Later, in a subsequent session, ~/.cache/oh-my-opencode/connected-providers.json appears and contains the authenticated providers

Screenshot and/or share link

N/A

Operating System

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 GNU/Linux

Terminal

xterm-256color (WSL)

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions