DocsSearch
Key Features
On this page
Instant Search (Sub-60ms Latency)#
- "Search-as-you-type": Results update instantly with every keystroke.
- Edge N-Gram Indexing: We frontload the work by pre-computing prefix matches (e.g., "cal" -> "calculate") during indexing: 2–20 character prefixes of every word in titles and in the first 4 KiB of each message, trading disk space for fast lookup at query time.
- Smart Tokenization: Handles
snake_case("my_var" matches "my" and "var"), hyphenated terms, and code symbols (c++,foo.bar) correctly. - Zero-Stall Updates: The background indexer commits changes atomically;
reader.reload()ensures new messages appear in the search bar immediately without restarting. - One-shot CLI overhead: the sub-60ms figure is the engine query. A one-shot
cass searchcurrently spends roughly a second in archive open and integrity preflight on a ~10 GB archive;--robot reports that separately as--robot-meta _meta.timing.other_ms, whilesearch_msstays in the tens of milliseconds.
Optional Semantic Search (Local by Default)#
-
Local inference: Uses frankensearch's pure-Rust native MiniLM implementation with local safetensors weights. Once MiniLM is installed, no network traffic is required to answer queries.
-
Warm-daemon reuse: Semantic and hybrid CLI searches automatically use an already-running local embedding daemon (including a socket selected with
CASS_DAEMON_SOCKET) and only initialize the installed in-process model if daemon inference fails. Passto permit auto-spawning a missing daemon in human-mode searches (robot/JSON searches never spawn one, even with--daemon , because their bounded budget cannot wait for a daemon to start; start--daemon cass daemonyourself first;_meta.effective.daemonshows the request and what applied), orto force direct inference.--no-daemon stays in the deterministic hash-vector space. Each data directory gets a distinct default socket and owner-private pinned key; fresh handshake, health, embedding, batch, and rerank challenges authenticate the exact response and immutable Frankensearch embedding identity before any daemon output is used.--fast-only progressive refinement (fast results refined in place by the quality tier) is experimental and currently inactive: the one-shot CLI collapses it to a single-tier quality search and the TUI's progressive lanes are disabled at HEAD, so hybrid search today is lexical plus one MiniLM refinement pass when the model is installed.--two-tier -
Opt-in acquisition:
cass models installdownloadsfrom Hugging Face on explicit request and verifies SHA256 checksums.all-minilm-l6-v2 cass models installexplicitly selects--model multilingual-minilm paraphrase-multilingual-MiniLM-L12-v2for CJK and mixed-language retrieval. Nothing is fetched until an install command runs, and merely installing the multilingual model never changes the active space. -
Air-gapped install:
cass models installaccepts a pre-downloaded model directory so you can bring the assets in yourself.--model <minilm|multilingual-minilm>--from-file <dir> -
Switching spaces: both models output 384 values, but their identities and vectors are incompatible. Set
CASS_SEMANTIC_EMBEDDER=multilingual-minilm, then runcass models backfill; cass keeps lexical fail-open active until the complete new generation is atomically published.--tier quality--embedder multilingual-minilm -
Required files (all must be present after install;
cass models verifychecks the selected model):--model <minilm|multilingual-minilm>model.safetensorstokenizer.jsonconfig.jsonspecial_tokens_map.jsontokenizer_config.json
-
Vector index: Stored as
vector_index/index-<embedder>.fsviin the data directory. -
Lexical fail-open: While the model is absent,
cassreturns lexical-only results and reportsfallback_mode="lexical"in health/status; search never blocks on semantic assets.
Opt-In Conversation Title Search#
Conversation titles can provide useful evidence when the messages themselves
contain generic discussion. Enable CASS_SEMANTIC_TITLES=1 during indexing and
search to combine a separate title vector with each conversation's best body
match. The default remains the existing body search.
# Uses the selected installed native model; this does not install a model.
CASS_SEMANTIC_TITLES=1 cass index --semantic
CASS_SEMANTIC_TITLES=1 cass search 'PostgreSQL query planner' --mode semantic --json
CASS_SEMANTIC_TITLES=1 cass search 'PostgreSQL query planner' --mode hybrid --robot
# Resume bounded title maintenance alongside the selected body backfill.
CASS_SEMANTIC_TITLES=1 cass models backfill --tier quality --max-batches 4 --json
Titles use the same selected native MiniLM, multilingual MiniLM, or explicit
hash model as their body space. External embedding providers are not supported
for titles. A title-only edit updates the title artifact without re-embedding
unchanged message bodies. Explicit semantic indexing prepares the required
SQLite scope index; scheduled work reports needs_setup until that foreground
setup has completed. Enabled background indexing subsequently maintains a
bounded batch of up to 64 conversations when title artifacts already exist.
The semantic leg combines title and body evidence per conversation. Its results still cite real archived messages, including an alternative message when the stored representative falls outside a requested role or time range. Agent, workspace, source, session-path and time filters apply before title top-k selection. Canonical edits, deletions and the durable forget fence invalidate stale title evidence. Searching never builds or repairs title artifacts.
| Setting | Default | Effect |
|---|---|---|
CASS_TITLE_FUSION |
weighted |
Choose weighted cosine scores, rrf ranks, or max over active channels |
CASS_TITLE_WEIGHT |
0.25 |
Title contribution from 0 (body only) through 1 (title only); changes do not require re-embedding |
CASS_TITLE_BODY_CANDIDATES |
1000 |
Body candidate budget, from 1 to 1000 |
CASS_TITLE_CANDIDATES |
1000 |
Title candidate budget, from 1 to 1000 |
CASS_TITLE_TOTAL_CANDIDATES |
2000 |
Combined conversation budget, from 1 to 2000 |
CASS_TITLE_MAX_ADMISSION_TITLES |
100000 |
Maximum titles admitted against canonical history per request; maximum 1000000 |
Opted-in robot results include request-local title_search metadata with the
policy, indexed and eligible title counts, stale exclusions, candidate bounds,
and timings. semantic_title and semantic_title_body identify results with
title evidence. This metadata establishes candidate validity and does not claim
that every current conversation has an indexed title. Title and body artifacts
have independent coverage. The offline hash regressions verify routing,
filtering and lifecycle behavior; they do not measure neural relevance gains.
Opt-In External Embeddings#
An OpenAI-compatible embedding service can own inference, including any GPU it supports. Select external explicitly and set CASS_EXTERNAL_EMBEDDINGS=1 to consent to sending selected archive text during backfill and query text during semantic search. Configuring a URL alone sends nothing. Local models and hash embeddings keep their existing behavior.
Configure the endpoint's actual model name, output dimension and a stable model revision before backfilling. This example assumes a loopback service producing 384-dimensional vectors:
export CASS_EXTERNAL_EMBEDDINGS=1
export CASS_EXTERNAL_EMBEDDING_URL='http://127.0.0.1:8000/v1/embeddings'
export CASS_EXTERNAL_EMBEDDING_MODEL='your-model-name'
export CASS_EXTERNAL_EMBEDDING_DIMENSION=384
export CASS_EXTERNAL_EMBEDDING_REVISION='model-revision-1'
# Set CASS_EXTERNAL_EMBEDDING_API_KEY separately if the service requires it.
cass models backfill --tier quality --embedder external --data-dir /path/to/cass-data --json
CASS_SEMANTIC_EMBEDDER=external cass search 'your query' --mode semantic --data-dir /path/to/cass-data --json
Use HTTPS for a non-loopback endpoint. Redirects and URLs containing credentials, a query or a fragment are refused. Responses must name the configured model and supply finite, unit-normalized vectors of the declared dimension. Fixed public probes check dimensions, normalization and repeatability before archive/query text is sent. Endpoint, model, dimension and revision identify a separate vector space; changing them requires its own completed backfill, while credential rotation preserves the space. Provider errors retain durable backfill checkpoints. A blocking request remains bounded by CASS_EXTERNAL_EMBEDDING_TIMEOUT_MS when cancellation occurs.
The persistent service also accepts with and ; it uses the same consent and publication admission. cass capabilities and cass list every provider setting and default without printing configured values or contacting the endpoint. External protocol tests use a synthetic loopback service; they establish neither GPU performance nor a provider's retrieval quality.
Explicit Hash Vector Tier#
The deterministic hash embedder is available only when explicitly selected, such as with , , or CASS_SEMANTIC_EMBEDDER=hash. It is a separate lexical-feature vector space, not a silent substitute for missing MiniLM vectors:
| Feature | ML Model (MiniLM) | Hash Embedder (FNV-1a) |
|---|---|---|
| Meaning Understanding | ✅ "car" ≈ "automobile" | ❌ Exact tokens only |
| Initialization Time | ~500ms (model loading) | <1ms (instant) |
| Network Dependency | None (after install) | None |
| Disk Footprint | ~90MB model files | 0 bytes |
| Deterministic | ✅ Same input = same output | ✅ Same input = same output |
Algorithm:
- Tokenize: Lowercase, split on non-alphanumeric, filter tokens <2 characters
- Hash: Apply FNV-1a to each token
- Project: Use hash to determine dimension index and sign (+1 or -1) in a 384-dimensional vector
- Normalize: L2 normalize to unit length for cosine similarity
When to Use:
- Quick setup without downloading model files
- Environments where ML inference overhead is unwanted
- Fast-tier testing or an explicitly chosen degraded mode
Override: Set CASS_SEMANTIC_EMBEDDER=hash to force hash mode even when ML model is available.
FSVI Vector Index Format#
cass uses the frankensearch FSVI vector index format (.fsvi) for storing semantic embeddings.
Features:
- Memory-mappable: large indexes open without copying into RAM
- Quantization: supports
f32andf16storage for smaller on-disk size - Fast search: exact brute-force vector search by default; HNSW approximate search runs only when
is passed and the HNSW sidecar file exists. In--approximate status,--json hnsw_presentandhnsw_state(present_unverifiedwhen a sidecar file exists) report the sidecar;hnsw_readyis currently alwaysfalse, because status does not verify native ANN admission
Index Location: ~/.local/share/coding-agent-search/vector_index/index-<embedder>.fsvi
Search Modes#
cass supports three search modes, selectable via flag or Alt+S in the TUI:
| Mode | Algorithm | Best For |
|---|---|---|
| Lexical | BM25 full-text | Exact term matching, code searches |
| Semantic | Vector similarity | Conceptual queries, "find similar" |
| Hybrid (default) | Lexical + single-tier semantic refinement fused with RRF; lexical fail-open | Balanced precision and recall |
Lexical Search: Uses Quill's BM25 implementation with prefix matching. Best when you know the exact terms you're looking for. The lexical index is derived from SQLite; if it is missing, stale, or incompatible, cass reports the state and rebuilds through the normal indexing path from the canonical database.
Semantic Search: Computes vector similarity between query and indexed MiniLM embeddings. Finds conceptually related content even without exact term overlap. Explicit semantic mode requires the MiniLM model and a compatible MiniLM vector index; it never substitutes same-dimensional hash vectors.
Hybrid Search: The default. It combines lexical and semantic results using Reciprocal Rank Fusion (RRF) when semantic assets are ready, and it fails open to lexical when semantic enrichment is still catching up or disabled:
RRF_score = Σ 1 / (K + rank_i)
Where K=60 (tuning constant) and rank_i is the position in each result list. This balances the precision of lexical search with the recall of semantic search. Semantic refinement is a single pass over the installed MiniLM index; progressive two-tier refinement () is experimental and currently inactive.
# CLI examples
cass search "authentication" --mode lexical --robot
cass search "how to handle user login" --mode semantic --robot
cass search "auth error handling" --mode hybrid --robot
Advanced Search Features#
- Wildcard Patterns: Full glob-style pattern support:
foo*- Prefix match (finds "foobar", "foo123")*foo- Suffix match (finds "barfoo", "configfoo")*foo*- Substring match (finds "afoob", "configuration")
- Auto-Fuzzy Fallback: On small indexes (up to 10,000 documents by default), an exact search with sparse results is retried with
*term*wildcards to broaden matches. A visual indicator shows when the fallback is active. - Query History Deduplication: Recent searches deduplicated to show unique queries; navigate with
Up/Downarrows. - Match Quality Ranking: New ranking mode (cycle with
F12) that prioritizes exact matches over wildcard/fuzzy results. - Match Highlighting: Snippets mark the terms the engine matched with
**bold**, in human-readable and robot/JSON output alike;also marks the query terms' other occurrences, never marking a term twice.--highlight
Rich Terminal UI (TUI)#
Powered by FrankenTUI (ftui) — a high-performance Elm-architecture TUI framework with adaptive frame budgets, Bayesian diff selection, and spring-based animations.
- Three-Pane Layout: Filter bar (top), scrollable results (left), and syntax-highlighted details (right).
- Multi-Line Result Display: Each result shows location and up to 3 lines of context; alternating stripes improve scanability.
- Live Status: Footer shows real-time indexing progress—agent discovery count during scanning, then item progress as a progress bar labelled
Indexing 150/2000 (7%)—plus active filters. - Multi-Open Queue: Queue multiple results with
Ctrl+Enter, then open all in your editor withCtrl+O. Confirmation prompt for large batches (≥12 items). - Find-in-Detail: Press
/to search within the detail pane; matches highlighted withn/Nnavigation. - Mouse Support: Click to select results, scroll panes, or clear filters.
- Theming: Adaptive Dark/Light modes with role-colored messages (User/Assistant/System). Presets include dark, light, high-contrast, and accessible variants.
- Ranking Modes: Cycle through
recent/balanced/relevance/qualitywithF12; quality mode penalizes fuzzy matches. - Analytics Dashboard: 7 views (Dashboard, Explorer, Heatmap, Breakdowns, Tools, Plans, Coverage) with interactive charts, KPI tiles, and drill-down filtering. Open with
Alt+A;Escreturns to search. - Inline Mode: Run
cass tuito keep terminal scrollback intact. The UI anchors to a region of the terminal while logs scroll normally. Configure with--inline and--ui-height <rows>.--anchor top|bottom - Macro Recording: Capture input sessions with
cass tuifor reproducible bug reports and workflow automation. Events are saved as human-readable JSONL with full timing data.--record-macro session.macro - Asciicast Recording: Capture reproducible TUI demos and bug repro artifacts with
cass tui.--asciicast demo.cast- Security default: recording captures terminal output only (input keystrokes are not serialized by default).
HTML Session Export#
Export conversations as styled, portable HTML files with optional encryption:
- Mostly Self-Contained: All layout CSS and the export payload are inlined directly; the file opens without a local web server and references no Tailwind CDN (Tailwind is not used at runtime). Only the Prism.js syntax-highlighting assets are loaded from
cdn.jsdelivr.net, pinned with SRI hashes. - Progressive Enhancement / Graceful Degradation: Prism.js resources fall back via
onerror="...no-prism"— code blocks remain readable offline in plain monospace, and the page layout never depends on a network resource. - Password Protection: AES-256-GCM encryption with PBKDF2 key derivation (600,000 iterations)—opens directly in any browser
- Rich Styling: Dark/light themes, syntax-highlighted code blocks, collapsible tool calls
- Print-Friendly: Optimized print styles with page breaks and footers
- Searchable: Built-in search functionality within the exported document
- Credential redaction: HTML and generic conversation exports redact recognized credentials by default, including raw source files and archives indexed with redaction disabled.
explicitly preserves source credentials and marks the output as sensitive. Encryption uses the same sharing policy.--include-secrets
TUI Usage: Press Ctrl+E in the detail view to open the export modal, or Ctrl+Shift+E to export Markdown immediately with defaults. On the detail pane's Export tab, e/h open the HTML export modal and m runs the Markdown export.
CLI Usage:
# Basic export
cass export-html /path/to/session.jsonl
# With encryption
printf '%s\n' "secret" | cass export-html /path/to/session.jsonl --encrypt --password-stdin
# Explicit raw-fidelity export (contains credentials; handle as sensitive)
cass export-html /path/to/session.jsonl --include-secrets --json
# Custom output location
cass export-html session.jsonl --output-dir ~/exports --filename "my-session"
# Open in browser after export
cass export-html session.jsonl --open
# Robot mode (JSON output)
cass export-html session.jsonl --json
Universal Connectors#
Ingests history from 35 local agent connectors, normalizing them into a unified Conversation model. cass capabilities is the canonical machine-readable inventory (kept in lockstep with the runtime registry):
- Codex:
~/.codex/sessionsand~/.codex/archived_sessions(Rollout JSONL, plain or zstd-compressed.jsonl.zst) - Cline: VS Code global storage (Task directories)
- Gemini CLI:
~/.gemini/tmp(Chat JSON) - Claude Code:
~/.claude/projects(Session JSONL), plus macOS Desktop metadata sidecars under~/Library/Application Support/Claude/claude-code-sessionsand~/Library/Application Support/Claude/local-agent-mode-sessions - Clawdbot:
~/.clawdbot/sessions(Session JSONL) - Vibe (Mistral):
~/.vibe/logs/session/*/messages.jsonl(Session JSONL) - OpenCode:
.opencodedirectories (SQLite) - Amp:
~/.local/share/amp& VS Code storage - Cursor:
~/Library/Application Support/Cursor/User/global + workspace storage (SQLitestate.vscdb) - ChatGPT:
~/Library/Application Support/com.openai.chat(v1 unencrypted JSON; v2/v3 encrypted—see Environment) - Aider:
~/.aider.chat.history.mdand per-project.aider.chat.history.mdfiles (Markdown) - Pi-Agent:
~/.pi/agent/sessions(Session JSONL with thinking content;pi_agent_rustSQLite sessions too) - Pi Durable (
pi_durable): Pi's experimental durable harness (@earendil-works/pi-durable). SQLite stores at<agent dir>/experimental/durable-sessions/<cwd-hash>/<ms>-<uuid>/session.sqlite(agent dirPI_CODING_AGENT_DIRor~/.pi/agent); JSONL commit-log stores under explicit roots. Each conversation in a store (lead, forks, task-owned children) is its own conversation. System prompts, task checkpoints and application documents are never indexed, and the stores are not raw-mirrored - Prime Agent (
prime_agent):~/.prime/agent/sessions/<session-id>.jsonl(versions 1–3). Indexes the active branch with omission counts for abandoned siblings; preserves thinking, tool results and context summaries. Overrides, in precedence order:PRIME_AGENT_SESSION_DIR, legacyPRIME_AGENT_CODING_AGENT_SESSION_DIR, thenPRIME_AGENT_CODING_AGENT_DIR(with/sessionsappended). Prime retains its own agent identity. - Oh My Pi (
omp): OMP v18's default~/.omp/agent/sessions, named profiles under~/.omp/profiles/<name>/agent/sessions, XDG stores under$XDG_DATA_HOME/omp, and explicit OMP-only archive roots viaCASS_OMP_DATA_ROOT(pi-family JSONL, including per-session sub-agent transcripts) - GitHub Copilot Chat: VS Code global storage under
(JSON)github.copilot-chat - Copilot CLI:
, legacy~/.copilot/session-state ~/.copilot/history-session-state, andgh copilotconfig paths (JSONL/JSON) - OpenClaw:
~/.openclaw/agents/*/agent/openclaw-agent.sqlite(native SQLite transcripts) and~/.openclaw/agents/*/sessions(legacy JSONL).OPENCLAW_STATE_DIRselects a different state directory. Watch mode polls database/WAL/SHM bundles under selected database files, state directories, and remote mirrors, and enrolls native stores created after startup. Discovery checks supported paths and immediate agent directories without walking session logs. Mirrors of.openclawor.openclaw/agentssupport both retained-basename and contents-copy layouts. Native history suppresses a legacy migration copy only within the same physical agent directory, so another mirror's same-named session remains searchable. - Goose:
~/.local/share/goose/sessions/sessions.db(SQLite, v1.20+), plus the earlier per-session*.jsonllayout under~/.goose/sessions - Crush:
~/.crush/crush.dband per-project.crush/crush.db(SQLite) - Hermes: the default
~/.hermes/state.dbplus each named profile's~/.hermes/profiles/<name>/state.db(SQLite), including homes with only profile stores.HERMES_HOMEselects one literal home directory and includes its profiles;HERMES_SQLITE_DBselects one existing database. Explicit project-local.hermeshomes and profile directories are supported too. Conversations retain their nativesession_idand recordprofile(defaultfor the root); named-profile identities are scoped to their store so equal session IDs do not merge. Plaincass indexdiscovers existing profile history, and watch mode follows profile databases and their WAL sidecars. Selecting an individual database or sidecar refreshes only that store. - Devin CLI:
~/.local/share/devin/cli/sessions.db(SQLite; override withCASS_DEVIN_DATA_ROOT). Indexes visible local sessions along their active parent chain, preserving tool messages and excluding abandoned branches and inline image payloads. Cloud-only sessions are outside this connector's scope. - Shelley: reads the local SQLite conversation database directly. Set
CASS_SHELLEY_DB=/absolute/path/to/shelley.db, or add that file to thepathsof atype = "local"source insources.toml. Any filename is accepted after schema validation. Defaults include~/.config/shelley/shelley.dbandshelley.dbin the current directory. Live indexing watches the database and its WAL/SHM sidecars; metadata changes refresh existing sessions.CASS_SKIP_SUBAGENTS=1excludes conversations with a Shelley parent ID. The database can also contain credentials and application settings, so raw mirroring and remote database ingestion are disabled; keep the database on its original machine. - Grok Bot: indexes the desktop application's local rolling chat replica. Set
CASS_GROK_BOT_DATA_ROOTto its persistence directory. Native message IDs preserve already indexed history as older messages leave the application's window; repeat scans do not duplicate retained messages. CASS reads only chat content. Raw mirroring and automatic fleet copying are disabled because the replica also holds secret and approval fields. This connector is separate from the Grok CLI connector and does not fetch cloud history. - Kimi Code:
$KIMI_CODE_HOME/sessions/*/*/agents/*/wire.jsonl(default; sub-agents index as~/.kimi-code <sessionId>:<agentId>), plus the legacy~/.kimi/sessions/*/*/wire.jsonllayout (Session JSONL) - Muse Code:
~/.local/share/muse/sessions/<YYYY>/<MM>/<DD>/<session-id>/session.jsonl, including nestedsubagent/*/session.jsonltranscripts (override withCASS_MUSE_DATA_ROOT) - Qwen Code:
~/.qwen/tmp/*/chats/session-*.json(Chat JSON) - Factory (Droid):
~/.factory/sessions(JSONL files organized by workspace slug) - Antigravity (IDE + agy CLI): both stores are probed by default — the IDE's
~/.gemini/antigravity/and the CLI's~/.gemini/antigravity-cli/— each holdingbrain/<uuid>/.system_generated/logs/transcript.jsonl(clean JSONL transcript) with the durable per-conversationconversations/<uuid>.db(SQLite) mirrored alongside. IDE conversations are keyedide/<uuid>so the two stores never collide;CASS_ANTIGRAVITY_DATA_ROOTreplaces both with one explicit base. Resume withcass resume <transcript>(--agent agyagy).--conversation <uuid> - OpenHands (OpenDevin):
~/.openhands/conversations/<id>/—base_state.jsonmetadata plus anevents/event-NNNNN-<uuid>.jsonevent stream (JSON) - Grok Build (xAI
grok):~/.grok/sessions/<percent-encoded-cwd>/<session-uuid>/—updates.jsonl(authoritative ACP session-update stream) withsummary.jsonmetadata andchat_history.jsonlfallback (override the base dir withGROK_HOME). Resume withgrok.--resume <session-id> - Codebuff / Freebuff (
codebuff):~/.config/manicode/projects/<project>/chats/<chat-id>/chat-messages.jsonwith its(override withrun-state.json CASS_CODEBUFF_DATA_ROOT). Both products write the same Manicode store and no chat records which binary wrote it, so their sessions share one lineage identity,codebuff(filter with). Messages are reconciled by their native IDs, so an edited message updates in place instead of duplicating.--agent codebuff - Kiro CLI (
kiro):~/.kiro/sessions/cli/<session-uuid>.jsonl(append-only event log: prompts, assistant messages, tool results) with the matching<session-uuid>.jsonsnapshot read for session ID, working directory, title, timestamps and model. - Continue (
continue):~/.continue/sessions/<id>.json, one JSON snapshot per session holding its current ordered history (IDE extension and CLI).CONTINUE_GLOBAL_DIRmoves the store, as it does for Continue itself. - ZCode CLI / Desktop (
zcode): reads~/.zcode/cli/db/db.sqlite(Windows:%USERPROFILE%\.zcode\cli\db\db.sqlite) with structural validation that distinguishes ZCode from OpenCode. Overrides, in precedence order:ZCODE_SESSION_DB_PATH,ZCODE_SESSION_DB,storage.sessionDbPathin<storage>/cli/config.json, then<storage>/cli/db/db.sqlite;<storage>isZCODE_STORAGE_DIRor~/.zcode. Indexes visible prompts, assistant text, reasoning and tool calls in recorded sequence, preserves direct token usage, excludes soft-deleted sessions and injected system reminders, and honorsCASS_SKIP_SUBAGENTS=1. Watch mode follows database, WAL, SHM and rollback-journal changes. Raw mirroring and automatic remote copying are disabled because the database also contains local settings and internal prompt snapshots. Rollout logs, desktop logs, credentials, provider configuration and certificates are never indexed.cass resumeis not supported for ZCode.
Claude Code Desktop sidecars preserve title, workspace, model, and session IDs, but not necessarily the full conversation body. If Claude Code has culled an old CLI JSONL body, cass can still index searchable sidecar metadata while reporting that the conversation body is unavailable.
Connector Details#
Pi-Agent parses JSONL session files with rich event structure:
- Location:
~/.pi/agent/sessions/(override the agent home withPI_CODING_AGENT_DIR, or the sessions directory directly withPI_SESSIONS_DIR) - Format: Typed events—
session_start,message,model_change,thinking_level_change - Features: Extracts extended thinking content, flattens tool calls with arguments, tracks model changes
- Detection: Scans for
*_*.jsonlpattern in sessions directory
Oh My Pi (omp) uses the same pi-family wire format but remains a separate
agent identity throughout search, analytics, resume, TUI, and HTML export:
- Default and profiles:
~/.omp/agent/sessions/and~/.omp/profiles/<name>/agent/sessions/;OMP_PROFILEselects a profile and takes precedence over legacyPI_PROFILE - XDG:
$XDG_DATA_HOME/omp/sessions/and$XDG_DATA_HOME/omp/profiles/<name>/sessions/when the OMP XDG root exists - Overrides and ownership:
PI_CODING_AGENT_SESSION_DIRnames the exact OMP sessions directory.CASS_OMP_DATA_ROOTdeclares an OMP-only archive/store root and is the right choice for copied, mounted, or custom OMP data.PI_CODING_AGENT_DIRis shared by both pi-family programs, so CASS conservatively keeps otherwise-ambiguous paths under that root owned by Pi-Agent; use one of the OMP-specific variables when OMP identity matters.PI_CONFIG_DIRchanges the home-relative.ompconfig directory name. - Resume: results in the current live home/config store use
omp; copied profiles, XDG archives, remote mirrors, and explicit roots also carry[--profile <name>]--resume <id>so a canonical-looking archive cannot reopen a different live store--session-dir <dir> - Upgrade behavior: archives created by older cass versions are reclassified from
pi_agenttoompusing the same conservative canonical/XDG/remote-mirror ownership policy as live discovery, then the derived lexical index and analytics are rebuilt so a transcript cannot remain attributed to both agents. The conventional~/.local/share/ompshape is durable path evidence; an arbitrary historical custom$XDG_DATA_HOME/omppath is reclassified only while that root is currently configured and resolvable. Without provider-qualified evidence, ambiguous historical paths fail closed as Pi-Agent rather than letting a generic.../omp/sessionsdirectory steal ownership.
OpenCode reads SQLite databases from workspace directories:
- Location:
.opencode/directories (scans recursively from home) - Format: SQLite database with sessions table
- Detection: Finds directories named
.opencodecontaining database files
Remote Sources (Multi-Machine Search)#
Search across agent sessions from multiple machines—your laptop, desktop, and remote servers—all from a single unified index. cass uses SSH/rsync to efficiently sync session data, tracking provenance so you know where each conversation originated.
Interactive Setup Wizard (Recommended)#
The easiest way to configure multi-machine search is the interactive setup wizard:
cass sources setup
What the wizard does:
- Discovers SSH hosts from your
~/.ssh/config - Probes each host to check for:
- Existing cass installation (and version)
- Agent session data (Claude, Codex, Cursor, Gemini, etc.)
- System resources (disk space, memory)
- Lets you select which hosts to configure
- Installs cass on remotes that don't have it (optional)
- Indexes existing sessions on remotes (optional)
- Configures
sources.tomlwith correct paths and mappings - Syncs the configured remotes by running
cass sources syncright after configuration (skipped withor--skip-sync ;--dry-run setup defers it and reports the command to run)--json
Wizard options:
| Flag | Purpose |
|---|---|
|
Configure only specific hosts (comma-separated) |
|
Preview changes without applying them |
|
Use auto-detected defaults for scripting |
|
Don't install cass on remotes |
|
Don't run indexing on remotes |
|
Skip the final cass sources sync. Interactive setup runs that sync after the hosts are configured and records it as complete only once it has actually finished; setup always defers it and reports sync.status = "pending" with the command to run |
|
Resume an interrupted setup |
|
Output progress as JSON (for automation) |
Examples:
# Full interactive wizard
cass sources setup
# Configure specific hosts only
cass sources setup --hosts laptop,workstation,build-server
# Preview without making changes
cass sources setup --dry-run
# Resume interrupted setup
cass sources setup --resume
# Non-interactive for CI/CD
cass sources setup --non-interactive --hosts myserver --skip-install
Resumable state: If setup is interrupted (Ctrl+C, connection lost), state is saved to the cache directory (~/.cache/cass/setup_state.json on Linux). Resume with .
Testing your real fleet#
Tailscale discovery is optional: cass sources discover adds
online tailnet peers to SSH-config discovery, and cass sources setup
offers them in setup. It reads local tailscale status with a five-second
deadline; a missing CLI, stopped daemon, or login failure produces a warning and
leaves SSH-config discovery available. Explicit setup skips discovery.
Connections use ordinary SSH over assigned Tailscale IPv4 addresses, so MagicDNS
is not required. Matching SSH aliases retain their user/key configuration;
otherwise SSH uses its normal defaults. IPv6-only peers are currently omitted.
Tailscale ACLs, SSH authorization and host-key checks still apply; discovery does
not log in, install Tailscale, or change either SSH or tailnet configuration.
The local fixture and Docker tests do not prove that your machines can sync and
search each other's sessions. The opt-in live harness uses actual SSH connections
and cass sources discover, sources add, sources sync, and search. It creates isolated synthetic
Codex sessions on each machine, checks source provenance and filters, repeats a
sync to detect duplicates, and appends messages. It checks both lexical and default
hybrid search, requires one JSON response per sync, holds the real indexing lock to
test busy refusal, and recovers transferred sessions through sources reingest.
A refused SSH connection must leave the other sources searchable.
Keep the inventory and SSH configuration outside this repository. For example, create a mode-0600 JSON file containing:
{
"ssh_config": "/private/path/to/ssh_config",
"hosts": [{"ssh": "workstation"}, {"ssh": "laptop"}]
}
Then run with an explicit binary:
python3 scripts/e2e/live_fleet_search.py \
--inventory /private/path/to/fleet.json \
--cass-bin /path/to/cass
Python 3 and authenticated SSH access are required on the remote machines.
The Unix runner needs Python 3.9+, rsync, and a CASS binary supporting the tested
commands. Each inventory alias must appear in the supplied SSH configuration;
included configuration files are supported. Host-key verification stays enabled.
To exercise actual tailnet discovery and transport, add to the
harness command and use tailnet IPv4 addresses as the private inventory targets.
Keep any required SSH users, keys and trusted host-key aliases in the private SSH
configuration. For a discovery test independent of explicit aliases, use SSH
Match originalhost entries rather than literal Host entries for those addresses.
The harness retains fresh test directories and raw
receipts privately outside git; it never changes existing session archives or
deletes test data. Console results use ordinal labels. An unreachable machine
keeps the overall result failed, even if the other machines pass. Do not attach
raw receipts or inventories to public issues: they contain machine identities.
Remote Installation Methods#
When the wizard installs cass on remote machines, it tries every viable method in this priority order, falling through to the next when one fails; setup fails only when all of them do, and the error lists each attempt:
| Priority | Method | Speed | Requirements |
|---|---|---|---|
| 1 | Pre-built binary | ~10s | curl/wget, GitHub access, compatible release binary |
| 2 | Source build | ~30 min | rustup and cargo, curl/wget, 6GB free disk in $HOME, 10GB RAM |
| 3 | Full bootstrap | ~30 min | curl, 6GB free disk in $HOME, 10GB RAM (installs rustup, then builds as in 2) |
The source build does what install.sh does: it downloads the
release tag's source archive into $HOME, installs the Rust toolchain that
tag's pins (a dated nightly; cass does not build on
stable), and runs cargo install inside it, so the
binary lands in ~/.cargo/bin/cass. The unpacked tree is removed afterwards. It
does not use crates.io. It builds with thin LTO instead of the release
profile's fat LTO, so the binary is somewhat larger and slower than the
published one. Measured building v0.10.0 on a fresh account (two build jobs):
28 minutes, 8.6 GB peak compiler memory (10.9 GB and 36 minutes with fat LTO),
1.5 GB toolchain, 0.8 GB cargo cache and a 2.6 GB build tree. The wizard
offers it only to hosts above those floors.
crates.io lags the releases: the newest version on crates.io is 0.7.0 (2026-08-25), so
cargo installbuilds 0.7.0. Later versions depend oncoding-agent-search andfranken-agent-detection frankensearchat exact git revisions. Their required APIs must be published before CASS can return to registry-only dependencies (bead zztql; GH #548). Use the installer or the GitHub Release binaries for a current version.
Resource Requirements:
- Minimum 1GB free disk in
$HOMEfor the pre-built binary - 6GB free disk in
$HOMEand 10GB RAM for a source build - Linux pre-built binaries require glibc 2.28+ on conventional FHS-style distributions (see System Requirements); older glibc, musl-only, and NixOS hosts fall back to source installation when possible.
- SSH access with key-based authentication
What Gets Installed:
- The
cassbinary (location depends on method:~/.cargo/bin/cassfor cargo-based,~/.local/bin/cassfor pre-built binary) - No daemon, no background services—just the binary
Installation Progress: The wizard shows real-time progress for each stage:
Installing cass on laptop...
[1/4] Checking environment... ✓
[2/4] Downloading binary... ████████░░ 80%
[3/4] Verifying checksum... ✓
[4/4] Setting up PATH... ✓
Use if you prefer to install manually on remotes.
Host Discovery & Probing#
The setup wizard automatically discovers SSH hosts from your configuration:
Discovery Sources:
~/.ssh/config(parses Host entries)- Hosts with wildcards (
*,?) are automatically excluded
Probe Results (for each discovered host):
| Check | Purpose |
|---|---|
| Connectivity | Can we establish SSH connection? |
| cass Version | Is cass already installed? What version? |
| Agent Data | Which agents have session data? |
| Session Count | How many conversations exist? |
| System Info | OS, architecture, disk space, memory |
Each setup run probes every selected host afresh; probe results are not cached between runs.
For Clawdbot, Kimi, and Kiro CLI, the wizard checks ~/.clawdbot/sessions, ~/.kimi/sessions, , and ~/.kiro/sessions/cli. Sync preserves those directory names inside each source mirror so the native reader can index the transcripts. A previously synced transcript-only source acquires this layout on its next successful sync. For Continue, Factory, and Vibe, the wizard checks the transcript directories ~/.continue/sessions, ~/.factory/sessions, and ~/.vibe/logs/session before suggesting them for sync. Settings and authentication files elsewhere in those homes stay outside the suggested paths.
Manual Setup#
For manual configuration without the wizard:
# Add a remote machine using platform presets
cass sources add user@laptop.local --preset macos-defaults
# Or specify paths explicitly
cass sources add dev@workstation --path ~/.claude/projects --path ~/.codex/sessions
# Sync sessions from all configured sources
cass sources sync
# Check source health and connectivity
cass sources doctor
Remote Archive Safety#
Remote source diagnostics are intentionally local-only. cass triage ,
cass doctor , cass health , and cass status report the
remote_source_sync summary from cass-owned evidence: sources.toml,
sync_status.json, the local remotes/<source>/mirror/ copy, and archive DB
provenance rows. They do not open SSH sessions, mutate remote machines, or
rewrite provider session logs while classifying source gaps.
cass sources doctor is the explicit networked exception: it performs bounded,
read-only probes of configured source hosts. Its per-source human summary keeps
the same native reachability, binary-health, and mirror/sync state codes and
safe command as the JSON report. It intentionally does not claim local search
readiness, because a remote host probe cannot establish the controller's local
SQLite, lexical, or semantic asset state.
This matters because agent harnesses can prune their own logs. If a laptop is
retired, a remote path disappears, or a provider truncates older sessions, the
cass archive DB and cass-owned local mirror may be the only remaining evidence
for those conversations. Treat gap names such as remote_source_unavailable,
remote_source_pruned, local_archive_ahead_of_remote, and
remote_copy_ahead_verified as preservation signals first: keep the archive and
mirror intact, then run the recommended cass sources sync (all configured remote sources; narrows it) or
source-specific sync command after reviewing the reported evidence.
To review a manual raw-mirror retention plan, use cass mirror prune or cass mirror prune . Add
after reviewing the scope and totals. Preview
entries contain at most 1,000 manifest/blob details; omitted_entry_count
reports additional candidates. Planned counts and bytes cover the entire plan,
including omitted details. Use provider/path selectors to inspect a narrower
scope. Previews do not append audit records. Add
to pin captures linked to tagged conversations. prune
holds down blobs referenced by captures from the last 7 days by default, writes
complete intent/result records to raw-mirror/v1/pruned.jsonl for non-empty
applied plans, and refuses apply mode
while an index/watch job is active.
Applied pruning syncs the audit independently of the optional capture setting
CASS_RAW_MIRROR_FSYNC. Each completed result is recorded before the next
removal; a later failure preserves those earlier results. An abrupt crash
between a removal and its result record can still leave an intent without a
confirmed result.
Use and/or with an age
or size rule to target one source without retiring unrelated captures.
Repeated providers are alternatives; a source-path glob further narrows them.
retires every capture of a source file except its newest N
(a source file is one provider, source and original path) and keeps those N
out of reach of and . Use it for a prune that runs
on a timer: cass mirror prune
keeps the mirror to the newest capture of each source file plus whatever was
captured inside the hold-down window, and never retires the only copy of a
session whose provider has since deleted it. Older captures of an appended
transcript share their complete chunks with the newest one, so retiring them
frees only their superseded tail chunks; for a file that was rewritten rather
than appended to, it also drops the earlier versions.
Indexing also runs automatic retention for the default archive. It keeps the
latest two captures per source file, honors a six-hour hold-down and the
keep, pinned, and recovery tags, and only retires an older capture when a
protected capture contains its verified byte-for-byte prefix. Automatic
retirement uses the same audit log. Set CASS_RAW_MIRROR_AUTO_PRUNE=0 to leave
retention to manual commands.
A capture stages its copy under raw-mirror/v1/tmp/capture.<pid>.<ts>.<n> and
holds the mirror lock until it publishes. A capture that is killed, for example
by a timeout around cass index, leaves that directory behind. An unscoped
cass mirror prune (no or ) takes the same lock, so
any staging directory it finds is abandoned. The preview lists each one that
has not been written for an hour, with its size, as a staging entry, and
removes it. Staging-named symlinks are not followed.
A pruned capture of a source that is still on disk is copied again by the next
index run. On a machine whose providers never delete their session files, set
CASS_RAW_MIRROR=0 (or false, no, off) to stop capturing altogether.
Indexing and search are unchanged, and existing captures stay until you prune
them. cass doctor reports raw_mirror_capture_disabled and warns about what is
given up: a session file its provider later deletes survives only in the
archive DB.
With a selector, measures unique blobs in that selection. Shared
blobs still referenced outside it and orphan blobs without source provenance
remain protected. The JSON plan records the selectors and scope_blob_bytes.
Large mutable sources are stored as content-addressed chunks: JSONL and
NDJSON transcripts of 256 KiB or more in 256 KiB chunks, and other sources of
8 MiB or more, such as SQLite stores, in 4 MiB chunks. A growing transcript
reuses every unchanged complete chunk, so an index run after an append stores
only its changed tail chunk and a manifest, and SQLite sources reuse unchanged
4 MiB byte regions. New chunks use zstd when it reduces their stored size.
Chunks that do not shrink are stored as-is. Existing whole-blob and plain
chunked captures remain readable. cass doctor reports storage_kind,
chunk_count and the full-source digest, and verifies every referenced chunk
before treating a snapshot as recovery authority.
CASS_RAW_MIRROR_MAX_BYTES defaults to 8 GiB and counts stored file bytes,
including manifests and capture caches. CASS_RAW_MIRROR_MIN_FREE_BYTES
defaults to 2 GiB of free disk space. When a budget refuses a capture,
indexing can still proceed and cass status reports the refusal under
raw_mirror_capture. Review the budget and free space before changing
retention settings.
Configuration File#
Sources are configured in the platform config directory (Linux: ~/.config/cass/sources.toml, macOS: ~/Library/Application Support/cass/sources.toml):
[[sources]]
name = "laptop"
type = "ssh"
host = "user@laptop.local"
paths = ["~/.claude/projects", "~/.codex/sessions"]
sync_schedule = "manual"
[[sources]]
name = "workstation"
type = "ssh"
host = "dev@work.example.com"
paths = ["~/.claude/projects"]
sync_schedule = "daily"
# Path mappings rewrite remote paths to local equivalents
[[sources.path_mappings]]
from = "/home/dev/projects"
to = "/Users/me/projects"
# Agent-specific mappings
[[sources.path_mappings]]
from = "/opt/work"
to = "/Volumes/Work"
agents = ["claude_code"]
Configuration Fields:
| Field | Description |
|---|---|
name |
Friendly identifier (becomes source_id) |
type |
Connection type: ssh or local |
host |
SSH host (user@hostname) |
paths |
Paths to sync (supports ~ expansion) |
sync_schedule |
manual, hourly, or daily. Only the jobs installed by cass schedule install run it; without them it is a label and syncs happen when you run cass sources sync |
path_mappings |
Rewrite remote paths to local equivalents |
CLI Commands#
# List configured sources
cass sources list [--verbose] [--json]
# Add a new source
cass sources add <user@host> [--name <name>] [--preset macos-defaults|linux-defaults] [--path <path>...] [--no-test] [--json]
# Set how often `cass schedule install` jobs sync a remote source (default: manual)
cass sources schedule <name> <manual|hourly|daily> [--json]
# Remove a source
cass sources remove <name> [--purge] [-y]
# Check connectivity and config
cass sources doctor [--source <name>] [--json]
# Sync sessions
cass sources sync [--source <name>] [--no-index] [--verbose] [--dry-run] [--json]
Read-Only (rrsync) Remotes#
A key restricted in the remote's authorized_keys to command="rrsync works: cass sources sync retries without (which rrsync refuses), and the connectivity check in sources add and sources doctor runs true, the one non-rsync command rrsync allows. Three things differ from an unrestricted key:
- Write remote paths without
~. cass expands~by asking the remote shell for$HOME, and rrsync refuses that. - rrsync anchors every path at its directory. With
rrsync, configure-ro /home/user/.claude/projects(served as/home/user/.claude/projects);/home/user/.claude/projectswould be served as/home/user/home/user/.claude/projects. Paths containing..are refused. - Tailscale SSH authenticates through the tailnet, not
authorized_keys, so a forced command does not restrict a Tailscale SSH session. Use a regular sshd for a read-only key.
Excluding Noisy Agent Harnesses#
If one harness is generating mostly junk or looped output, you can disable it persistently even if its files remain on disk:
# Inspect current include/exclude state
cass sources agents list --json
# Stop indexing this harness in future runs
cass sources agents exclude openclaw
# Re-enable it later
cass sources agents include openclaw
cass stores this preference in sources.toml (~/.config/cass/sources.toml on Linux, ~/Library/Application Support/cass/sources.toml on macOS). New scans, syncs, and watcher processes read the saved exclusion.
By default, cass sources agents exclude <agent> also removes already archived local data for that agent and rebuilds the lexical index so the exclusion frees space instead of only blocking future imports.
A purging exclusion requires exclusive access to the selected archive and search data. If an indexer, watcher, or maintenance operation already holds that access, the command exits with code 7 and leaves configuration and archive data unchanged. Stop the active process, then retry the exclusion. Once admitted, the command retains exclusive access through deletion and publication of the rebuilt lexical index.
Exclusions apply to a whole connector. Excluding openclaw also removes archived conversations for named agents such as openclaw/alice and openclaw/bob. Qualified names such as openclaw/alice are rejected by exclude; they are never silently widened to the whole connector. Use cass forget to preview removing only that named agent's archived conversations, then add to confirm the deletion.
If you want to block future indexing but keep the data already archived:
cass sources agents exclude openclaw --keep-indexed-data
This option saves only the configuration change and can run while indexing is active. Restart any running watcher for the new exclusion to take effect; its current selection of connectors remains active until it exits.
Sync Engine Internals#
The sync engine uses rsync over SSH for efficient delta transfers and falls back to other transports when rsync is unavailable:
Transfer Methods (auto-detected):
| Method | When Used | Characteristics |
|---|---|---|
| rsync | rsync available on both ends | Delta transfers, compression, progress stats |
| WSL rsync | Windows without native rsync, WSL with rsync installed | Runs wsl rsync |
| scp | rsync unavailable | Full file copies through the system scp, inheriting the OpenSSH agent, keys and ~/.ssh/config |
| SFTP | the fallbacks above unavailable | Full file transfers via the SSH native protocol |
Safety Guarantees:
- Additive-only syncs: rsync runs WITHOUT
, so remote deletions never propagate locally.--delete - Local copies follow the remote: rsync runs with
and without-a , so a local mirror file that differs from the remote is overwritten, even when the local copy is newer. The mirror is a copy of the remote, not a place to edit sessions.-u - Interrupted transfers resume:
keeps a partly transferred file under its final name so the next sync continues it. A failed sync can therefore leave a truncated file until the next sync completes.--partial
Transfer Configuration:
| Setting | Default | Purpose |
|---|---|---|
| Connection timeout | 10s | Fail fast on unreachable hosts |
| Transfer timeout | 300 s of I/O inactivity | rsync aborts a transfer that stalls this long; there is no wall-clock limit on a transfer that keeps moving |
| Compression | Enabled | Reduce bandwidth for text-heavy sessions |
| Partial transfers | Enabled | Resume interrupted syncs |
rsync Flags Used:
-avz --links --safe-links --stats --partial [--protect-args | --secluded-args] --timeout 300 \
-e "ssh [-F $CASS_SSH_CONFIG] -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=yes"
Where = archive mode + verbose + compression. / is auto-detected per remote rsync version (omitted when the remote rejects it), and carries the transfer timeout in seconds. StrictHostKeyChecking=yes means a host whose key is not already in known_hosts fails with "Host key verification failed". Connect once with plain ssh <host> and accept the key, or add it with , before the first sync.
Data Flow:
Remote: ~/.claude/projects/
↓ (rsync over SSH)
Local: ~/.local/share/coding-agent-search/remotes/<source>/mirror/<path>_<hash>/
↓ (connector scan)
Index: agent_search.db + index/v9-quill/
Where <path> is a filesystem-safe version of the remote path (e.g. .claude_projects), and <hash> is an FNV-1a hash of the original path in hex, so foo/bar and foo_bar never collide.
Sessions from remotes are indexed alongside local sessions, with provenance tracking to identify origin.
Path Mappings#
When viewing sessions from remote machines, workspace paths may not exist locally. Path mappings rewrite these paths so file links work on your local machine:
# List current mappings
cass sources mappings list laptop
# Add a mapping
cass sources mappings add laptop --from /home/user/projects --to /Users/me/projects
# Test how a path would be rewritten
cass sources mappings test laptop /home/user/projects/myapp/src/main.rs
# Output: /Users/me/projects/myapp/src/main.rs
# Agent-specific mappings (only apply for certain agents)
cass sources mappings add laptop --from /opt/work --to /Volumes/Work --agents claude_code,codex
# Remove a mapping by index
cass sources mappings remove laptop 0
TUI Source Filtering#
In the TUI, filter sessions by origin:
- F11: Cycle source filter (all → local → remote → all)
- Shift+F11: Open source filter menu to select specific sources
Remote sessions display with a source indicator (e.g., [laptop]) in the results list.
Provenance Tracking#
Each conversation tracks its origin:
source_id: Machine identifier (e.g., "laptop", "workstation")origin_kind:localorremoteorigin_host: the remote host label, absent for local sessionsworkspace_original: Original path on the remote machine (before path mapping)
selects exactly source_id, origin_kind and origin_host.
These fields appear in JSON/robot output and enable filtering:
cass search "auth error" --source laptop --json
cass timeline --since 7d --source remote
cass stats --by-source