anomalyco / anomalyco/opencode
[FEATURE]: Will 2.0 config hot-reload expose an HTTP/SDK trigger for headless `serve`?
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.