Skip to content

WorkspaceAdaptor.create type in @opencode-ai/plugin is missing the env parameter #23233

Closed

Description

@jamesmurdza

Description

The WorkspaceAdaptor type exported from @opencode-ai/plugin declares a 2-arg create, but opencode's internal control-plane type declares 3 args (with env in the middle) and the call site actually passes 3. Pinned to tag v1.4.11:

Plugin type (missing env) — packages/plugin/src/index.ts:52:

create(config: WorkspaceInfo, from?: WorkspaceInfo): Promise<void>

Control-plane type (with env) — packages/opencode/src/control-plane/types.ts:31:

create(info: WorkspaceInfo, env: Record<string, string | undefined>, from?: WorkspaceInfo): Promise<void>

Call site (passes env) — packages/opencode/src/control-plane/workspace.ts:121:

await adaptor.create(config, env)

Fix

Sync the plugin-facing type with the control-plane type:

-  create(config: WorkspaceInfo, from?: WorkspaceInfo): Promise<void>
+  create(
+    config: WorkspaceInfo,
+    env: Record<string, string | undefined>,
+    from?: WorkspaceInfo,
+  ): Promise<void>

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. jlongster commented on Apr 18, 2026

    @jlongster
    Collaborator

    You are right, missed this, thank you! will fix

  2. jamesmurdza commented on Apr 18, 2026

    @jamesmurdza
    ContributorAuthor

    @jlongster @rekram1-node Have also opened a PR here: #23235

  3. jamesmurdza commented on Apr 20, 2026

    @jamesmurdza
    ContributorAuthor

    @jlongster Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions