anomalyco / anomalyco/opencode

[FEATURE]: Hot-reload agents, skills and commands.

Open
#8,751 23 comments 111 reactions 1 assignee View on GitHub

@thdxr is already working on this.

Since Jan 15, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

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

Allow configs to be invalidated and reloaded while OC is running. This not only enables the users to create new agents/skills/commands and instantly use them, but it also allows the agents themselves to develop these skills or create new agents on the fly and instantly use them (Ralph Loops, anyone?).

Proposal:

  • Watch instance + config directories when hot-reload is enabled.
  • When agent/, skill/, or command/ markdown changes: invalidate cached state and reload immediately.
  • When custom tool .ts/.js changes: re-import with cache busting. (I believe this is a side effect that can be removed)
  • Emit config.updated, skill.updated, command.updated so TUI/Desktop refresh live.

Is it safe? Not necessarily, and is not for everyone. I have a functioning version of it, that is locked behind EXPERIMENTAL_HOT_RELOAD flag. Kept changes to minimum and preserved everything from upstream. https://github.com/IgorWarzocha/opencode/tree/agent-skills-commands-hot-reloading

It works, but there are some caveats - agents would need a create skill/command/agent tool for creating a markdown files that pass the parsing check (if it fails, nothing happens). This is probably the easiest implementation - let agent do the thing, and as a return of the tool call, give it a path to the file and ask it to expand the instructions set and leave the frontmatter alone.

Toast on reload would be a nice addition, but I'm not doing either until I know if there's actually a demand for this.

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.