Interactive terminal UI for inspecting, debugging, and maintaining the Lossless Claw database. Browse conversations, navigate the summary DAG, see exactly what the model sees in context, and perform surgical repairs — all from the terminal.
From releases:
Download the latest binary from GitHub Releases.
From source:
go build -o lcm-tui .
# or: go install github.com/Martian-Engineering/lossless-claw/tui@latestRequires Go 1.24+.
lcm-tui # default: ~/.openclaw/lcm.db
lcm-tui --db /path/to/lcm.db # custom database pathBrowse & Inspect
- Agent/session browser — drill down from agents → sessions → conversations
- Windowed conversation paging — keyset pagination by
message_idfor large LCM conversations - Summary DAG — expandable tree of the full summary hierarchy with depth, kind, token counts, and source messages
- Context view — see the exact ordered list of summaries + messages the model receives each turn
- Large files — inspect intercepted oversized files and their exploration summaries
Repair & Maintain
- Rewrite (
w) — re-summarize a node using current depth-aware prompts - Subtree rewrite (
W) — bottom-up rewrite of an entire branch with auto-accept mode - Dissolve (
d) — reverse a condensation, restoring parent summaries to active context - Repair — find and fix corrupted summaries (fallback truncations from failed API calls)
- Transplant — deep-copy summary DAGs between conversations with full message/edge rewiring
- Backfill — import pre-LCM JSONL sessions, compact depth-aware history, optional single-root fold + transplant
Prompt Management
- Four depth-aware templates: leaf, d1 (session), d2 (arc), d3+ (durable)
- Export, customize, diff, and render templates via
lcm-tui prompts
Each interactive operation has a standalone CLI equivalent for scripting:
lcm-tui repair 44 --apply # fix corrupted summaries
lcm-tui rewrite 44 --all --apply --diff # re-summarize everything
lcm-tui dissolve 44 --summary-id sum_abc --apply # undo a condensation
lcm-tui transplant 18 653 --apply # copy DAG between conversations
lcm-tui backfill my-agent session_abc --apply # import + compact historical session
lcm-tui backfill my-agent session_abc --apply --recompact --single-root # re-fold existing import to one root
lcm-tui prompts --list # show active prompt sourcesFull reference with keybindings, screen descriptions, flag tables, and troubleshooting: docs/tui.md
The TUI reads directly from the LCM SQLite database (~/.openclaw/lcm.db) and session JSONL files (~/.openclaw/agents/). Write operations (rewrite, repair, dissolve, transplant, backfill) use transactions. Changes take effect on the next conversation turn — no restart needed.
Rewrite, repair, and backfill compaction operations call provider APIs directly. By default they use Anthropic (claude-sonnet-4-20250514), and rewrite/backfill also support OpenAI (--provider openai --model gpt-5.3-codex) with OPENAI_API_KEY.
Part of the Lossless Claw monorepo.