Skip to main content
Glama

Continue opencode session

opencode_continue

Resume the prior coding session in the same workspace, send follow-up prompts, and apply changes with configurable sandbox permissions.

Instructions

Continue the opencode session rooted at this workspace.

Resumes the exact session id opencode reported on the last opencode_ask in this workspace (-s <id>), falling back to opencode's own "most recent session for this directory" (-c) when that in-memory pin is gone — so it still works after a server restart. Session scoping is per directory (verified live: the same -c from a different directory starts a fresh session), so pass the same workspace you asked in. The permission policy applies per invocation, so sandbox takes effect here too: analyze read-only with opencode_ask, then continue with "workspace-write" to apply the fix.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.30.0

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses several non-obvious behaviors beyond the annotations: session id pinning with -s, fallback to -c, per-directory session scoping, and per-invocation permission policy application. Even though annotations already indicate non-read-only and non-idempotent behavior, the description adds critical operational context about restart resilience and scoping. No contradiction with annotations.

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?

The description is front-loaded with the core purpose and is dense with useful information, though it is a fairly long paragraph. Every sentence earns its place, but the final sentence is a long multi-clause construction. It is appropriately sized for the tool's complexity, though slightly more compact structuring would be ideal.

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

Completeness5/5

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

Given the tool's complexity and the presence of an output schema, the description covers all important behavioral nuances: session continuation, fallback behavior, directory scoping, sandbox semantics, and workflow guidance. Nothing critical for correctly invoking the tool is missing.

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?

The input schema already covers all 5 parameters with descriptions, so the baseline is 3. The description adds meaningful semantic context: workspace must match the prior session's directory, sandbox applies per invocation with an example value, and watch uses the same viewer as opencode_ask. This raises the score above baseline.

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?

The description states a specific verb and resource: 'Continue the opencode session rooted at this workspace.' It also explains the exact session-recovery mechanism, which clearly differentiates it from sibling tools like opencode_ask and opencode_status. The purpose is unambiguous and distinct.

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

Usage Guidelines5/5

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

The description gives explicit usage context: it should be used after opencode_ask, the same workspace must be passed, and it works even after a server restart via fallback to opencode's -c behavior. It also provides a practical workflow: analyze read-only with opencode_ask, then continue with workspace-write to apply fixes. This is strong when-to-use guidance.

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