No slash command · from opencode
Guides interpreting OpenCode task results, summarizing file changes, and polling live progress via companion status or HTTP server for tool-call traces.
Ships in opencode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OpenCode returns results as structured session data containing:
When displaying results from /opencode:result:
OpenCode sessions can be resumed by sending additional messages to the same session.
The --resume-last flag in the companion script handles this by reusing the last session ID
from the current workspace state.
A dispatched opencode task produces live progress in several layers — use the appropriate tool for the granularity you need.
Phase-level signals like starting → investigating → running → completed/failed. Useful to confirm the task is alive, not the specific work.
node "${CLAUDE_PLUGIN_ROOT}/scripts/opencode-companion.mjs" status <task-id> --json
Returns JSON with job.status, job.phase, job.elapsed, job.opencodeSessionId, and a progressPreview string (just phase-transition lines).
OpenCode runs a local HTTP server on http://localhost:4096 that exposes every message and tool call in every session. Hitting the messages endpoint gives you the complete live trace of what opencode is doing — bash commands it ran, file reads, edits, assistant reasoning text, tool results. This is the best signal for "what has opencode actually done so far."
curl -s http://localhost:4096/session/<sessionId>/message
Get <sessionId> from Layer 1's job.opencodeSessionId (format ses_XXXXXXXXX...). Returns a JSON array where each element has .info.role (user / assistant) and .parts[] with:
type: "text" → part.text is the assistant's reasoning or commentarytype: "tool" → part.tool is the tool name, part.state.input is the tool args, part.state.status is pending / running / completed / errorTypical usage — tail the last N messages for a quick "what is it doing now":
curl -s http://localhost:4096/session/<sessionId>/message | python3 -c '
import json, sys
msgs = json.load(sys.stdin)
for m in msgs[-10:]:
role = m.get("info", {}).get("role", "?")
for p in m.get("parts", []):
t = p.get("type")
if t == "text":
print(f" [{role}/text] {p.get(\"text\",\"\")[:200]}")
elif t == "tool":
st = p.get("state", {})
inp = st.get("input", {}) or {}
cmd = inp.get("command") or inp.get("file_path") or inp.get("pattern") or ""
print(f" [{role}/tool/{p.get(\"tool\")}/{st.get(\"status\")}] {str(cmd)[:160]}")
'
When the rescue subagent runs companion task --wait via Bash run_in_background=true, the subagent's Bash tool emits a local_bash task-id (e.g. buzkqvlq7). Use TaskOutput(task_id=<bash-id>, block=false) to see the raw tail of the companion's stdout — this has phase lines, not the inner opencode session messages. Prefer Layer 2 for real content.
If Layer 2 shows the opencode task has been stuck on the same tool call for many minutes without progress, or is looping on the same error, surface that to the user — they can decide whether to cancel or let it continue. Do not silently wait through apparent deadlocks.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tasict/opencode-plugin-cc --plugin opencode3 skills in this plugin
Other plugins' skills for the same job