← Docs hub

OpenCode / OpenClaw adapter

Reads .jsonl session transcripts written by the OpenCode / OpenClaw agents — both use an identical schema.

Runs on bare llmwiki sync when OpenCode / OpenClaw app-config session dirs exist on disk.

Session store

The adapter auto-detects the store across platforms:

Both nested (<project>/<session>.jsonl) and flat (<project>-<session>.jsonl) layouts are handled.

What it reads

Each session is a JSONL stream of {role, content} records:

{"role": "user",      "content": "start a new feature"}
{"role": "assistant", "content": "…"}
{"role": "tool",      "content": "…"}

normalize_records() translates that schema into the Claude-style {type, message: {role, content}} that the shared renderer expects:

OpenCode role Claude-style type Claude-style role
user user user
assistant assistant assistant
tool user tool (preserved so the renderer can show tool turns distinctly)

Enable it

python3 -m llmwiki sync --adapter opencode

To turn it off after enabling via config:

{ "adapters": { "opencode": { "enabled": false } } }

Automated (headless) sessions

No verified automation-launch markers in the store today — sessions are treated as not headless under filters.exclude_headless. See Multi-agent setup.

Output layout

Standard raw/sessions/<YYYY-MM-DDTHH-MM>-<project>-<slug>.md.

Code

See also

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date