Skip to main content
Glama

Continue opencode session

opencode_continue

Resume an existing opencode session in the same workspace to send follow-up prompts, analyze read-only, then switch to workspace-write to apply fixes.

Instructions

Continue the opencode session: resumes the thread rooted at this workspace (-s <id>, else opencode's own -c for that directory), so pass the same workspace= as the ask (without it the sub-agent sees no repo). sandbox applies per turn: analyze read-only, then continue with "workspace-write" to apply the fix. Autonomous agent: trusted prompts only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "opencode_continue"
  }
}

Input Schema

NameRequiredDescriptionDefault
watchNoIf true, open the live "watch" view streaming opencode's steps (same viewer as opencode_ask). Default false.
promptYesFollow-up message for the existing session.
sandboxNoPermission policy for THIS turn (default "read-only"). Same values and caveats as opencode_ask.read-only
timeout_sNoMax seconds to wait for opencode to complete. Default 300.
workspaceNoWorking root used by the prior session. Defaults to the server cwd.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.30.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare a non-read-only, open-world, non-idempotent operation; the description adds the important behavior that the sandbox policy is evaluated per turn and that omitting workspace leaves the sub-agent with no repo. It also carries a safety caveat ('trusted prompts only') that annotations cannot express. It does not discuss what happens on timeout or whether a failed turn leaves partial state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and then the workspace pitfall, with no filler sentences. The parenthetical flag syntax (`-s <id>`, `-c`) and nested quotes make it denser than necessary, but each clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the two failure modes an agent would actually hit (wrong/missing workspace, wrong sandbox mode for applying changes) and the trust caveat; an output schema exists so return values need not be explained. Timeout and watch behavior are left entirely to the schema, which is a minor gap for a 5-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning the schema lacks: workspace must match the prior session's project dir or the agent sees no repo, and sandbox is per-turn rather than a session-wide setting. It does not add anything for watch or timeout_s beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Continue the opencode session: resumes the thread rooted at this workspace') and contrasts it with the ask path by pointing at `-c`/`-s` continuation of an existing session. An agent can distinguish it from opencode_ask without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete when-to guidance: reuse the same workspace as the ask, analyze read-only first, then continue with 'workspace-write' to apply the fix, and only use it with trusted prompts. It never explicitly names opencode_ask as the tool for starting a fresh session, so the boundary is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.