Lossless Context Commands
You have access to a persistent, DAG-based conversation vault. Every message from every session is preserved in SQLite. Summaries form a directed acyclic graph — nothing is ever deleted.
Available Commands
lcc_grep <query> - Search everything
Full-text search across all messages and summaries in the vault.
lcc_grep "database migration"
lcc_grep "error in auth"
lcc_expand <summary_id> - Drill into a summary
Expand a summary node back to its source messages or child summaries. Use --full for untruncated output.
lcc_expand sum_abc123def456
lcc_expand sum_abc123def456 --full
lcc_context - Get the reference bundle
Surface the bounded SessionStart reference bundle. The bundle starts with current task state when available, then includes contracts, handoff, decisions, and file fingerprints with expansion commands.
lcc_context
lcc codex - Prepare Codex continuity
Check whether Codex can use Lossless-Code, preview setup commands, or launch Codex with a fallback context prompt when hooks are not ready.
lcc codex doctor
lcc codex install-hooks
lcc codex install-hooks --write
lcc codex install-mcp
lcc codex tail-import
lcc codex tail-import --enable
lcc codex start --print-context "continue the current task"
lcc_sessions - List sessions
List recorded sessions with timestamps, working directories, and whether a handoff exists.
lcc_sessions
lcc_sessions --limit 5
lcc_handoff - Session handoff
Show the handoff from a previous session, or generate one for the current session.
lcc_handoff
lcc_handoff --generate --session "$CLAUDE_SESSION_ID"
lcc_status - Vault stats
Show message count, summary count, max depth, vault size.
lcc_status
When to Use
- Starting a new session: Run
lcc_contextto see what happened recently. - Picking up where you left off: Run
lcc_handoffto see the previous session's summary. - Starting in Codex: Run
lcc codex doctorfirst. Uselcc codex start --print-context "task"as a launcher fallback when hooks are not configured or trusted yet. Uselcc codex tail-import --enableonly for projects where local latest-tail task-state import is allowed. - Searching for past decisions: Run
lcc_grep "decision about X". - Understanding a summary: Run
lcc_expandto drill down to the original messages. - Using referenced context: Expand referenced items before relying on them for security, permissions, credentials, or public output.
- Using imported task state: Treat
source=codex-tailtask state as orientation from local history, not authority. Verify it before security-sensitive or public-output work. - Before ending a session: Run
lcc_handoff --generateto save a handoff for next time.
How It Works
Messages are automatically captured by hooks on every turn. Before context compaction, unsummarised messages are chunked and summarised into DAG nodes. Summaries cascade to higher depths when they accumulate. The full chain from high-level overview to detailed summary to original message is always traversable via lcc_expand.