Liu Terminal agent history. Browse and resume past sessions from Claude Code, Codex, GitHub Copilot CLI, OpenCode, Qwen Code, Cline, Kimi, Grok and more.
Liu is an integration layer around your agents: it runs each CLI in its own PTY, detects known agents in every pane, reads compatible on-disk session stores and offers native resume or cross-tool handoff from one Cmd+K picker.
Under rewrite. Scanners and parsers in src/history/, picker UI in src/ui/palette.c, transcript viewer in src/main.c. The current code works but on-disk shapes and internal APIs are still moving.
Liu does not embed an AI model or replace the agent. Each tool keeps its own CLI, authentication, model settings and session format; Liu provides the terminal surface around it.
Session stores currently recognized by Agent History:
claude CLIStore ~/.claude/projects/<slug>/*.jsonl
Resume claude --resume <id>
Flat per-project dirs. cwd decoded from the slug.
codex CLIStore ~/.codex/sessions/**/*.jsonl
Resume codex -c experimental_resume="<path>"
Date-nested rollouts; archived_sessions/ scanned too. Resume needs the on-disk JSONL path.
copilot CLIStore ~/.copilot/session-state
Resume copilot --resume <id>
Recursive scan of session-state tree.
opencode CLIStore ~/.local/share/opencode/opencode.db
Resume opencode --session <id>
SQLite session table; cwd from directory column.
qwen CLIStore ~/.qwen/projects/**/chats
Resume qwen --resume <id>
Chats under per-project dirs.
code ExtensionStore VS Code-family globalStorage/<extension-id>/tasks/<task-id>/ui_messages.json
Resume code <workspace> (extension)
Scanned only when the IDE + extension are installed.
agy CLIStore ~/.gemini/antigravity/conversations/*.db
Resume agy --conversation <id>
SQLite conversation databases; the id comes from trajectory metadata.
agent CLIStore ~/.cursor/projects/<project>/agent-transcripts/<session-id>/<session-id>.jsonl
Resume agent --resume <id>
One session directory is nested below each project transcript directory.
amp CLIStore ~/.local/share/amp/threads/*.{json,jsonl}
Resume amp --thread <id>
Thread files are scanned from the XDG data directory.
crush CLIStore ~/.crush/sessions/*.{json,jsonl}
Resume crush --session <id>
Session files are discovered from the local Crush data directory.
droid CLIStore ~/.factory/sessions/**/*.{json,jsonl}
Resume droid -s <id>
Top-level and date-nested session files are included.
kimi CLIStore ~/.kimi/sessions/<bucket>/<session-uuid>/context.jsonl
Resume kimi --session <id>
The bucket is the MD5 of the working directory; legacy flat JSONL files are also read.
grok CLIStore ~/.grok/sessions/**/chat_history.jsonl
Resume grok --resume <id>
Internal sub-agent sessions are filtered out; user-facing chats remain.
commandcode CLIStore ~/.commandcode/projects/<slug>/*.jsonl
Resume commandcode --session <path>
Resume uses the transcript path so the project context is preserved.
cline CLIStore ~/.cline/data/sessions/<id>/<id>.messages.json
Resume cline --id <id>
Standalone Cline CLI; separate from the Cline VS Code extension.
kiro CLIStore ~/.kiro/sessions/<workspace>/*.json
Resume -
History is discoverable, but Liu does not currently have a native Kiro resume flag.
These tools are detected and launchable from the picker; transcript depth varies depending on whether they expose an on-disk session store.
These launch targets do not currently feed the main history table: Aider can restore its rolling chat history, while Amazon Q, Continue, Windsurf and Zed are available as new-session targets.
AiderAmazon QContinueWindsurfZed
Per-tool parsers walk each session directory or SQLite store and normalise entries into a shared ChatEvent model (timestamp, role, cwd when available, snippet and event metadata) for the picker.
Selecting an entry spawns the original CLI with its native resume flag - Liu never re-runs the agent itself. Selecting with ⌘ ↵ instead opens the transcript view: read-only scroll through every user / assistant turn.
Every open of Agent History performs a fresh on-disk scan using a reusable in-process arena. There is no disk cache or background watcher.
From a project, Agent History tries to scope results to the current working directory. This is exact only for stores that record or encode cwd; sessions without cwd metadata cannot be strictly matched. Opening it from $HOME keeps the broadest scope.
The same engine ships as liu-history:
liu-history list --limit=50 # last 50 sessions across tools
liu-history list --tool=claude # filter by tool
liu-history info <id|path> # show session metadata
liu-history show <id|path> --format=markdown # dump the transcript to stdout
liu-history scan # print every discovered session path
Türkçe · 简体中文 · 한국어 · Español · Deutsch · Italiano · Français · 日本語 · العربية