Skip to main content
Glama
Claude Code × OpenCode

Claude Code × OpenCode

by AXLdev123

Wait for a session

oc_wait

Waits for a background OpenCode session to finish and returns its result; stops early when the agent needs permission or an answer.

Instructions

Wait until an OpenCode session started in the background (or unblocked) finishes, then return its result. Also stops when the agent is waiting for a permission or an answer to a question.

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": {
      "session_id": "<session_id>"
    },
    "name": "oc_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoStart timestamp (ms) of the turn, as returned by oc_delegate/oc_send. Default: the whole history.
detailNofinal = answer only; summary (default) = answer + tools + files; full = complete transcript of the turn.
timeout_sNoMax wait in seconds (default 900). Past it, the task keeps running and oc_wait picks it up.
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses a genuinely non-obvious behavior: the wait terminates early when the agent is blocked on a permission or question, meaning the return may not be a finished answer. It omits blocking duration/timeout behavior, though the timeout_s schema field covers that.

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

Conciseness5/5

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

Two short sentences, zero filler, with the primary wait-then-return behavior front-loaded and the early-stop exception second. Nothing redundant is present.

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

Completeness3/5

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

There is no output schema and no annotations, so the description should say more about what 'its result' looks like and what an agent should do when the wait returns early because of a pending permission (presumably oc_answer). It also doesn't distinguish itself from oc_result/oc_status, leaving ambiguity for a moderately complex blocking 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 75% and every parameter (since, detail, timeout_s, session_id) has a documented meaning, so the schema does the work. The description adds no parameter-specific guidance, but at this coverage level the baseline is met.

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

Purpose4/5

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

Names a specific verb and resource ('Wait until an OpenCode session ... finishes, then return its result') and clarifies scope via 'started in the background (or unblocked)'. It does not explicitly differentiate itself from lookalike siblings such as oc_result or oc_pending, so it stops short of a 5.

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

Usage Guidelines3/5

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

The phrase 'started in the background (or unblocked)' implies the tool is used after oc_delegate/oc_send, and the schema mentions those tools, but the description itself offers no explicit when-to-use vs. when-to-poll guidance and no exclusions (e.g., use oc_pending instead for non-blocking checks).

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