anomalyco / anomalyco/opencode

[FEATURE]: Will 2.0 config hot-reload expose an HTTP/SDK trigger for headless `serve`?

Open
#43,698 4 comments 1 reaction 1 assignee View on GitHub

@neriousy is already working on this.

Since Aug 20, 2026.

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

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Context

I see reload is being worked on for 2.0 (e.g. #42478, #42898), while earlier
generic requests (#10899, #22213, #23304, #4734) were closed. My use case is
different from those, so before I open a PR I want to check it fits your 2.0
direction.

Use case

Running opencode serve as a long-lived, headless backend driven over the
HTTP API / SDK (not the TUI). The selectable model catalog can change while the
process runs (a model added/removed/re-priced in an upstream OpenAI-compatible
gateway, or an operator curating the roster). Today the catalog is resolved once
per instance at first access and cached for the process lifetime, so the only
way to pick up a change is to restart serve — disruptive for a multi-session
backend.

This is NOT the file-watcher from #22213 and NOT the TUI /reload from #23304.
It's an explicit, programmatic trigger for embedded deployments.

Question

Will the 2.0 reload work expose a way to trigger a config re-read + provider/
model catalog rebuild over the HTTP API / SDK (e.g. POST {instance}/config/reload)?

If not, I'd like to propose a small endpoint on the experimental instance
config group that reuses the existing InstanceStore.reload machinery
(the same path handlers/project.ts initGit already uses via
markInstanceForReload) to rebuild Config + Provider state from disk. Happy
to submit the PR if that direction is welcome — flagging as a design-review item
per CONTRIBUTING first.

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.