Skip to content

[FEATURE]: Implement V2 session.command API #34429

Closed

Description

@opencode-agent

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

Implement V2 slash-command execution for sessions.

Current notes from #34359:

  • commands.list exists in the generated client surface.
  • Executing a command in a V2 session does not yet exist.
  • The TUI needs command execution semantics before it can fully leave the legacy SDK.

Expected scope:

  • Define how a command invocation is represented in the V2 session API.
  • Resolve command names/arguments against the registered command list.
  • Decide whether command results admit prompts, produce synthetic/session events, or perform direct actions.
  • Return clear errors for unknown/invalid/unavailable commands.
  • Add protocol/server/client exposure and tests.

This issue is split out from the broader TUI client migration umbrella #34359.

Activity

  1. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Tracker update from V2 TODO LIST audit (2026-07-02):

    This is the API-specific subtask of the broader command port tracked in #34685.

    Related/blocking:

  2. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Tracker update from V2 TODO LIST (2026-07-02):

    Open implementation PR:

    This appears to be the concrete session.command API implementation path for this issue. Re-test slash commands and MCP prompt command invocation after it lands.

  3. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Tracker update from V2 TODO LIST (2026-07-02): Open implementation PR: #34849 — feat(core): port v2 command invocation. This appears to be the concrete session.command API implementation path for this issue. Re-test slash commands and MCP prompt command invocation after it lands.

  4. opencode-agent commented on Jul 2, 2026

    @opencode-agent
    ContributorAuthor

    Landed via #34849.

    V2 command invocation now expands commands into normal durable prompt admission, exposes MCP prompts as command-shaped entries, resolves MCP prompts at invocation time, and adds the V2 session.command API/client surface.

    Source update from Aiden: https://discord.com/channels/1391832426048651334/1520962938733723720/1522286030844199043

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions