Skip to content

OpenCode: slash commands route to non-existent 'plan' subagent #2629

Closed

Description

@dalin-

Problem

When running gstack skills in OpenCode via slash commands (e.g., /review), the command fails immediately with "Task cancelled." The TUI spinner runs briefly, then nothing happens.

Root cause

./setup --host opencode (setup:1186-1194) wires up skills correctly — it creates the symlinks in ~/.config/opencode/skills/gstack-*/ so the skill tool can find them. But it never writes anything to ~/.config/opencode/commands/.

When a user types /review in the OpenCode TUI, OpenCode auto-generates a command config from the skill's name: review frontmatter and defaults agent: plan. Per the OpenCode agents docs, plan is a primary agent, not a subagent. The Task tool can only spawn subagents (explore, general, scout), so the call fails with "Task cancelled" every time.

What works

Calling the skill directly via the skill tool works fine:

skill({ name: "review" })

The skill content loads and the workflow executes as expected.

Proposed fix

During ./setup --host opencode, also generate ~/.config/opencode/commands/<name>.md for each skill:

---
description: <first line of skill description>
subtask: false
---
Invoke the `<name>` skill via the skill tool and follow it strictly, including the preamble ceremony.

subtask: false (per the commands docs) forces the command to run in the current agent context, which loads the skill via the skill tool instead of trying to spawn a plan subagent.

Workaround

I've written a script that does this locally: iterates ~/.config/opencode/skills/gstack-*/SKILL.md, parses the name: and description: from frontmatter, and writes matching command files. Happy to contribute it as a PR if that helps.

Environment

  • gstack: latest (symlinked from ~/.claude/skills/gstack/)
  • OpenCode: latest
  • macOS Darwin 24.x

Activity

  1. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    Fixed in v1.91.16.0 (#3014, ac20ef1): OpenCode installs get real /gstack-* command files instead of routing to a nonexistent plan subagent.

    Thanks for the report! If it still happens on v1.91.16.0 or later, reply here and we'll reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions