GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — server: long-running daemon stops activating configured providers after config hot-reload; restart fixes · Issue #66199 · anomalyco/opencode

server: long-running daemon stops activating configured providers after config hot-reload; restart fixes #66199

New issue
Copy link
New issue
Copy link
Duplicate
Duplicate
server: long-running daemon stops activating configured providers after config hot-reload; restart fixes#66199
Copy link
Labels
area/pluginsPlugins, skills, custom agentsplatform/linuxLinuxtype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@cristiandavidcaminos
cristiandavidcaminos
opened on Nov 24, 2026
Issue body actions

Summary

A long-running OpenCode server daemon stops exposing providers defined in the
config (providers) even though it keeps parsing them. The provider/model
catalog appears empty (only built-in + auth-based providers remain) until the
service is restarted. Restart reliably restores every configured provider.

Environment

  • opencode version: 2.2.0 (latest channel)
  • OS: Linux 6.8.0-1062-oracle (aarch64, Ubuntu 22.04)
  • Terminal: xterm-256color (tmux)
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: none declared in opencode.json / opencode.jsonc; a local
    repo plugin (shared-config) is configured via the plugin dir, and the
    config reload path logs plugin-reload errors (see Additional Context).

Reproduction

  1. Configure one or more custom OpenAI-compatible providers under
    providers in ~/.config/opencode/opencode.json (e.g. an entry with
    package: "@opencode/ai/providers/openai-compatible", settings.baseURL
    • settings.apiKey, and explicit models).
  2. Start the OpenCode service and confirm the models appear in /api/model.
  3. Leave the service running for a long time (days). While it is up, edit or
    reload the config (hot-reload). The config watcher emits
    provider.updated / model.updated events.
  4. Query /api/provider and /api/model.

Expected Behavior

Every provider defined in providers (and its models) continues to be exposed
by the running service after config reloads, matching the freshly-started state.

Actual Behavior

  • GET /api/config still contains the full providers map (Agnes, LiteLLM,
    etc.) with all models — the daemon parses them.
  • GET /api/provider only lists built-in opencode and auth-backed providers
    (e.g. inception); none of the config-defined providers are activated.
  • GET /api/model therefore lacks all custom-provider models.
  • Restarting the service (opencode service restart) fully restores every
    provider without any config change.

Additional Context

  • Frequency: intermittent, correlates with a daemon that has been alive for
    multiple days. In this case the service ran ~13 days before the catalog
    went empty; the same symptom is documented recurring on this host.
  • Associated log lines during the config hot-reload (role=server):
    • message="failed to reload plugins" cause="TypeError: r is not a function. (In 'r()', 'r' is an instance of Object)"
    • message="Failed to drain Session" cause="Session.AgentNotFoundError: Agent not found: \"gentle-orchestrator\""
  • Workaround: opencode service restart restores the catalog reliably and is
    the only thing that does.
  • This is not related to memory pressure: no kernel OOM events, ample free RAM.
  • Model IDs redacted for brevity; provider names are generic (Agnes, LiteLLM).

Activity

  1. opencodejr commented on Nov 24, 2026

    @opencodejr
    opencodejrBot
    on Nov 24, 2026
    Contributor
    More actions

    Thanks for the detailed report and the log lines. I think this is a duplicate of #49982.

    The key line is failed to reload plugins … TypeError: r is not a function. (In 'r()', 'r' is an instance of Object). With that error, a plugin reload fails partway through, and whatever had been registered after the failing plugin stays missing until the service restarts. In #49982 that was custom agents and commands. Your report shows it for the config-defined providers, and your Agent not found: "gentle-orchestrator" line is the same follow-on error seen there.

    Possible duplicates and closely related issues, ordered from most to least likely:

    • server: failed plugin reload on config change silently drops custom agents and commands until restart #49982: same … is not a function … instance of Object reload failure; registrations stay lost until a restart. Closed as fixed by fix(core): keep plugin swaps going when a cleanup fails #63548, which keeps the plugin swap going when a plugin's cleanup fails.
    • plugin: session-hook plugin activation triggers failed reload and wipes provider registry #52618: the same error wiping all custom providers from /api/provider; already closed as a duplicate of server: failed plugin reload on config change silently drops custom agents and commands until restart #49982.
    • plugin hot-reload failure wipes config-defined providers until service restart #53526: plugin hot-reload failure wipes config-defined providers until service restart (closed as not planned, same symptom).
    • plugin: npm plugin update/reload race drops custom providers until /reload #62068: custom providers dropped after a failed plugin reload, but caused by npm plugin cache churn (ENOENT).
    • server: custom providers from global config not registered on service boot #66166: custom providers missing right after service boot, recovered by opencode api post /api/location/reload.

    You're on 2.2.0. A user in #49982 confirmed that on v2.3.0 (which includes #63548) agents survive the failed reload without a restart. Please upgrade and check whether your providers survive too. Also worth checking: in #49982 the trigger was a plugin whose setup returns an object instead of a cleanup function, so your local shared-config plugin may be the one returning an object.

    I'm closing this issue now as a duplicate of #49982. If it still happens after upgrading, please add your details (version, the shared-config plugin's setup shape, and the log lines) to #49982. Replying here will reopen this issue.

  2. opencodejr
    closed this as a duplicateof server: failed plugin reload on config change silently drops custom agents and commands until restart #49982 on Nov 24, 2026
  3. opencodejr
    added
    area/pluginsPlugins, skills, custom agents
    platform/linuxLinux
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pluginsPlugins, skills, custom agentsplatform/linuxLinuxtype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.