OpenCode Status
opencode-statusCheck or wait for a running OpenCode turn, list tracked sessions, relay pending approvals, and batch-check up to 16 sessions in one call to collect parallel results.
Instructions
Use this to check on or wait for a running OpenCode turn, or — with no id — to list the sessions tracked by this server. With an id it can block up to wait-seconds (max 600) and will also relay any pending approval prompts to you, so it is not purely read-only: it can act on the session while waiting. Without an id it returns the tracked session list in structuredContent.sessions and structuredContent.content. Pass ids (up to 16, instead of a single sessionId/threadId/conversationId) to check several sessions in one call — pair with wait-seconds:0 on opencode/opencode-reply to fan work out in parallel, then wait-for "any" (default) or "all" here to collect the results; batch items are always compact and max-output-chars becomes the shared answer budget split across them. detail/max-output-chars shrink a single-session answer the same way as on opencode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | Check up to 16 sessions at once instead of one (batch mode): each array entry is a session id, unique, 1-200 chars. Mutually exclusive with sessionId/threadId/conversationId. Each id captures that session's current (or pending) turn at call start; an unknown id comes back as a per-item error, never failing the whole call. Pair with wait-seconds:0 on opencode/opencode-reply to fan several turns out in parallel, then batch-check them all here. | |
| detail | No | 'compact' (default 'standard') drops toolCalls and filesChanged from this response (keeping toolCallCount, filesChangedCount, pendingApprovalCount, and pendingApprovals itself) to save context; the full answer and tool-call log stay retrievable with opencode-output regardless of this setting. | |
| threadId | No | Alias for sessionId (Codex-compatible name), same session id value. Exactly one of sessionId, threadId, conversationId is required to target a session; opencode-status may omit all three to list tracked sessions instead. | |
| wait-for | No | Only with ids: 'any' (default) returns as soon as one item is ready; 'all' waits for every item (bounded by wait-seconds) before returning. Invalid without ids. | |
| sessionId | No | Id of a session tracked by this server, from a prior opencode call. Exactly one of sessionId, threadId, conversationId is required to target a session; opencode-status may omit all three to list tracked sessions instead. | |
| wait-seconds | No | How long (seconds, max 600, default 0) to wait for the turn to reach a terminal or approval-waiting state before returning a snapshot; while waiting, this call also relays pending approval prompts. With a single id: required id (sessionId/threadId/conversationId) or list mode is used instead. With ids: the batch wait bound (see wait-for). | |
| conversationId | No | Deprecated alias for sessionId, same session id value. Exactly one of sessionId, threadId, conversationId is required to target a session; opencode-status may omit all three to list tracked sessions instead. | |
| max-output-chars | No | Caps how many characters of the answer come back in THIS response only (0..44000; 0 returns no answer text at all). Never truncates the retained turn — read the rest with opencode-output. Omit to use the default for the chosen detail level (44000 standard, 2000 compact). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | No | ||
| diff | No | ||
| hint | No | ||
| kind | Yes | ||
| turn | No | ||
| agent | No | ||
| error | No | ||
| model | No | ||
| roots | No | ||
| total | No | ||
| action | No | ||
| agents | No | ||
| finish | No | ||
| models | No | ||
| offset | No | ||
| output | No | ||
| reason | No | ||
| server | No | ||
| status | Yes | ||
| tokens | No | ||
| turnId | No | ||
| cleanup | No | ||
| content | Yes | ||
| hasMore | No | ||
| partial | No | ||
| request | No | ||
| results | No | ||
| section | No | ||
| waitFor | No | ||
| readyIds | No | ||
| sessions | No | ||
| threadId | No | ||
| warnings | No | ||
| directory | No | ||
| elapsedMs | No | ||
| sessionId | No | ||
| toolCalls | No | ||
| truncated | No | ||
| nextOffset | No | ||
| observedAt | No | ||
| pendingIds | No | ||
| snapshotId | No | ||
| availability | No | ||
| filesChanged | No | ||
| resendSafety | No | ||
| responseLoop | No | ||
| upstreamRead | No | ||
| omittedFields | No | ||
| toolCallCount | No | ||
| upstreamRetry | No | ||
| executionState | No | ||
| opencodeVersion | No | ||
| pendingApprovals | No | ||
| structuredOutput | No | ||
| filesChangedCount | No | ||
| abortedRunningTurn | No | ||
| pendingApprovalCount | No | ||
| structuredOutputError | No | ||
| structuredOutputStatus | No |