You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
team_spawn fails on OpenCode 2.0.29: ctx.permission.rules is not a function #45
Version: opencode-ensemble 0.18.0, OpenCode 2.0.29 (server), Linux
What happens: team_spawn always fails with:
Failed to create session for teammate "scout": ctx.permission.rules is not a function. (In 'ctx.permission.rules({ sessionID: created.id, permissions })', 'ctx.permission.rules' is undefined)
Team creation, the task board (tasks_add/list), and team_cleanup all work — only spawn is broken.
makes team_spawn succeed and the teammate session starts (spawns fine afterwards).
Ask: port the permission re-assertion to the current V2 context API (or guard it if the API moved elsewhere), so ensemble works on current OpenCode 2.0.x servers. Happy to test a fixed release.
Fixed. The unguarded ctx.permission.rules call in src/v2-client.ts is now feature-detected (typeof ctx.permission?.rules === "function"), so team_spawn works on OpenCode 2.0.19+ where the API no longer exists — session.create permissions are honored there because session rules merge last (see the merge-order comment at the call site). Landed via #46 plus post-merge review fixes (commit 024967a), shipping in v0.20.0. Heads-up: v0.19.0 never actually reached npm (an expired publish token broke the pipeline), so opencode upgrade/cache clears kept handing you 0.18.0 — v0.20.0 is the first release since 0.18.0 to land on npm.
Activity
hueyexe commentedon Oct 19, 2026
Fixed. The unguarded
ctx.permission.rulescall insrc/v2-client.tsis now feature-detected (typeof ctx.permission?.rules === "function"), soteam_spawnworks on OpenCode 2.0.19+ where the API no longer exists — session.create permissions are honored there because session rules merge last (see the merge-order comment at the call site). Landed via #46 plus post-merge review fixes (commit 024967a), shipping in v0.20.0. Heads-up: v0.19.0 never actually reached npm (an expired publish token broke the pipeline), soopencode upgrade/cache clears kept handing you 0.18.0 — v0.20.0 is the first release since 0.18.0 to land on npm.