Agent History — Liu Terminal

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.

What “support” means

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.

  • Run: any CLI that works in a normal shell can run in a Liu tab or split pane.
  • Observe: Agent View identifies the foreground agent in each pane and shows its chat title and working state.
  • Remember: Agent History reads the session stores listed below and offers native resume where the tool exposes one.
  • Hand off: for compatible CLIs, Liu can write a compact Markdown handoff and start the next agent with that context.

Supported AI CLIs

Session stores currently recognized by Agent History:

Claude Code claude CLI

Store ~/.claude/projects/<slug>/*.jsonl

Resume claude --resume <id>

Flat per-project dirs. cwd decoded from the slug.

Codex codex CLI

Store ~/.codex/sessions/**/*.jsonl

Resume codex -c experimental_resume="<path>"

Date-nested rollouts; archived_sessions/ scanned too. Resume needs the on-disk JSONL path.

GitHub Copilot copilot CLI

Store ~/.copilot/session-state

Resume copilot --resume <id>

Recursive scan of session-state tree.

OpenCode opencode CLI

Store ~/.local/share/opencode/opencode.db

Resume opencode --session <id>

SQLite session table; cwd from directory column.

Qwen Code qwen CLI

Store ~/.qwen/projects/**/chats

Resume qwen --resume <id>

Chats under per-project dirs.

Cline / Roo / Kilo code Extension

Store VS Code-family globalStorage/<extension-id>/tasks/<task-id>/ui_messages.json

Resume code <workspace> (extension)

Scanned only when the IDE + extension are installed.

Antigravity agy CLI

Store ~/.gemini/antigravity/conversations/*.db

Resume agy --conversation <id>

SQLite conversation databases; the id comes from trajectory metadata.

Cursor Agent agent CLI

Store ~/.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 amp CLI

Store ~/.local/share/amp/threads/*.{json,jsonl}

Resume amp --thread <id>

Thread files are scanned from the XDG data directory.

Crush crush CLI

Store ~/.crush/sessions/*.{json,jsonl}

Resume crush --session <id>

Session files are discovered from the local Crush data directory.

Factory Droid droid CLI

Store ~/.factory/sessions/**/*.{json,jsonl}

Resume droid -s <id>

Top-level and date-nested session files are included.

Kimi kimi CLI

Store ~/.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 (xAI) grok CLI

Store ~/.grok/sessions/**/chat_history.jsonl

Resume grok --resume <id>

Internal sub-agent sessions are filtered out; user-facing chats remain.

Command Code commandcode CLI

Store ~/.commandcode/projects/<slug>/*.jsonl

Resume commandcode --session <path>

Resume uses the transcript path so the project context is preserved.

Cline CLI cline CLI

Store ~/.cline/data/sessions/<id>/<id>.messages.json

Resume cline --id <id>

Standalone Cline CLI; separate from the Cline VS Code extension.

Kiro kiro CLI

Store ~/.kiro/sessions/<workspace>/*.json

Resume -

History is discoverable, but Liu does not currently have a native Kiro resume flag.

Also detected

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

How it works

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.

CWD auto-filter

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.

Standalone CLI

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

Next Notifications →

Documentation

Getting started

Guides

Reference

Other languages

Türkçe · 简体中文 · 한국어 · Español · Deutsch · Italiano · Français · 日本語 · العربية