| name | opencode-conversations |
| description | View opencode CLI conversations/sessions from Claude Code or opencode — pull the FULL transcript (every turn, never a truncated window) or a COMPACTED summary produced by opencode's own configured compaction agent (agent.compaction in opencode.json) using opencode's built-in compaction prompt, run non-destructively on a throwaway fork. Use when the user wants to see / read / inspect / summarize an opencode session, check what happened in an `opencode -s <id>` session, or get a compact recap of a long opencode conversation. Triggers on: opencode session, opencode conversation, opencode -s, ses_, view opencode, read opencode chat, summarize opencode session, compact opencode, what happened in opencode. |
opencode-conversations — view opencode sessions (full or compacted)
Engine: oc-convo.py (next to this file). It shells out to the opencode CLI and,
for compaction, to opencode's local HTTP server. Works from Claude Code and the
opencode CLI — the same skill is installed in both:
| Agent | Skill path |
|---|
| Claude Code | ~/.claude/skills/opencode-conversations/ |
| opencode CLI | ~/.config/opencode/skills/opencode-conversations/ |
Resolve the script path (copy-paste this first)
OC_CONVO="$HOME/.claude/skills/opencode-conversations/oc-convo.py"
[ -f "$OC_CONVO" ] || OC_CONVO="$HOME/.config/opencode/skills/opencode-conversations/oc-convo.py"
(If the installer created the convenience launcher, oc-convo on PATH works too.)
Commands
python3 "$OC_CONVO" list [--limit N]
python3 "$OC_CONVO" full <sessionID>
python3 "$OC_CONVO" compact <sessionID>
python3 "$OC_CONVO" raw <sessionID>
full — the whole conversation
Prints every message in order: user/assistant text in full, assistant reasoning, tool
calls with their arguments, and tool results. Tool results are truncated to keep it
readable (they are often huge logs); text is never truncated.
--tool-chars N — cap tool-result length (default 800; -1 = show everything).
--no-reasoning — omit assistant reasoning blocks.
This always pulls the full session, never a segment.
compact — opencode's own compaction agent
Produces a summary using opencode's configured compaction agent — it reads
agent.compaction.model from ~/.config/opencode/opencode.json (e.g.
deepseek/deepseek-v4-flash) and calls opencode's POST /session/{id}/summarize,
which applies opencode's built-in compaction prompt.
- Non-destructive by default: the session is forked, the fork is summarized, the
summary is printed, and the fork is deleted — the original session is never modified.
--in-place — instead add a real compaction checkpoint to the original session.
--model provider/model — override the compaction model.
--timeout S — summarize timeout (default 600s).
How to use (agent guidance)
- If you don't know the session id, run
list (or the user gives an ses_… id, e.g.
from opencode -s ses_…).
- Default to
full when the user wants to read/inspect what happened.
- Use
compact when the user wants a recap/summary of a long session, or asks for
the "compacted" version. Mention it ran via opencode's compaction agent.
- For very long sessions, prefer piping
full to a file and reading that, or use
compact to get the gist first.
Requirements & notes
opencode CLI on PATH (or at ~/.opencode/bin/opencode) and python3 (stdlib only).
compact needs the compaction provider authenticated in opencode
(opencode auth list) — e.g. DeepSeek for deepseek-v4-flash.
- Robustness baked into the engine: exports are written to a temp file (opencode
truncates piped stdout at 64 KiB), and run with
--pure to disable plugins so the
JSON is clean.