anomalyco / anomalyco/opencode

[FEATURE]: Allow plugins to register custom WorkspaceDriver providers

Open
#45,612 0 comments 6 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 27, 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

We’re exploring OpenCode v2 support for Fly.io Sprites, where each OpenCode workspace would run inside a remote Sprite.

The new WorkspaceDriver abstraction appears to be a strong fit: a provider can provision a workspace, connect it to an environment driver, suspend it when idle, and destroy it. This would let OpenCode route shell and filesystem operations directly to a remote sandbox.

The current challenge is registration. workspaceProviders can be supplied when creating an embedded Effect SDK host, but it is not exposed through the v2 plugin API, and the Promise SDK omits that host option. As a result, third-party workspace drivers currently require replacing or custom-embedding the OpenCode host.

Would you consider exposing a supported extension point for registering workspace providers from packages or plugins? For example:

export default Plugin.define({
  id: "sprites",
  setup(ctx) {
    ctx.workspace.register("sprites", spritesWorkspaceDriver)
  },
})

Alternatively, workspace providers could be loaded from a dedicated configuration section:

{
  "workspaceProviders": {
    "sprites": {
      "package": "@flydotio/opencode-sprites"
    }
  }
}

The provider would implement the existing lifecycle contract:

interface WorkspaceDriver {
  create(input): Promise<{ binding: unknown }>
  connect(input): Promise<EnvironmentDriver>
  suspendForIdle(input): Promise<void>
  destroy(input): Promise<void>
}

This would enable Sprites and other remote sandbox systems—containers, VMs, cloud development environments, and ephemeral CI environments—without requiring each provider to ship a custom OpenCode server.

We’d be happy to prototype the Sprites driver and provide feedback on the extension API. Is package-level WorkspaceDriver registration something you would be open to supporting?

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.