$npx -y skills add Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations --skill cassCoding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
| 1 | # CASS - Coding Agent Session Search |
| 2 | |
| 3 | Unified, high-performance CLI/TUI to index and search your local coding agent history. Aggregates sessions from **11 agents**: Codex, Claude Code, Gemini CLI, Cline, OpenCode, Amp, Cursor, ChatGPT, Aider, Pi-Agent, and Factory (Droid). |
| 4 | |
| 5 | ## CRITICAL: Robot Mode Required for AI Agents |
| 6 | |
| 7 | **NEVER run bare `cass`** - it launches an interactive TUI that blocks your session! |
| 8 | |
| 9 | ```bash |
| 10 | # WRONG - blocks terminal |
| 11 | cass |
| 12 | |
| 13 | # CORRECT - JSON output for agents |
| 14 | cass search "query" --robot |
| 15 | cass search "query" --json # alias |
| 16 | ``` |
| 17 | |
| 18 | **Always use `--robot` or `--json` flags for machine-readable output.** |
| 19 | |
| 20 | --- |
| 21 | |
| 22 | ## Quick Reference for AI Agents |
| 23 | |
| 24 | ### Pre-Flight Check |
| 25 | |
| 26 | ```bash |
| 27 | # Health check (exit 0=healthy, 1=unhealthy, <50ms) |
| 28 | cass health |
| 29 | |
| 30 | # If unhealthy, rebuild index |
| 31 | cass index --full |
| 32 | ``` |
| 33 | |
| 34 | ### Essential Commands |
| 35 | |
| 36 | ```bash |
| 37 | # Search with JSON output |
| 38 | cass search "authentication error" --robot --limit 5 |
| 39 | |
| 40 | # Search with metadata (elapsed_ms, cache stats, freshness) |
| 41 | cass search "error" --robot --robot-meta |
| 42 | |
| 43 | # Minimal payload (path, line, agent only) |
| 44 | cass search "bug" --robot --fields minimal |
| 45 | |
| 46 | # View source at specific line |
| 47 | cass view /path/to/session.jsonl -n 42 --json |
| 48 | |
| 49 | # Expand context around a line |
| 50 | cass expand /path/to/session.jsonl -n 42 -C 5 --json |
| 51 | |
| 52 | # Capabilities discovery |
| 53 | cass capabilities --json |
| 54 | |
| 55 | # Full API schema |
| 56 | cass introspect --json |
| 57 | |
| 58 | # LLM-optimized documentation |
| 59 | cass robot-docs guide |
| 60 | cass robot-docs commands |
| 61 | cass robot-docs schemas |
| 62 | cass robot-docs examples |
| 63 | cass robot-docs exit-codes |
| 64 | ``` |
| 65 | |
| 66 | --- |
| 67 | |
| 68 | ## Why Use CASS |
| 69 | |
| 70 | ### Cross-Agent Knowledge Transfer |
| 71 | |
| 72 | Your coding agents create scattered knowledge: |
| 73 | - Claude Code sessions in `~/.claude/projects` |
| 74 | - Codex sessions in `~/.codex/sessions` |
| 75 | - Cursor state in SQLite databases |
| 76 | - Aider history in markdown files |
| 77 | |
| 78 | CASS **unifies all of this** into a single searchable index. When you're stuck on a problem, search across ALL your past agent sessions to find relevant solutions. |
| 79 | |
| 80 | ### Use Cases |
| 81 | |
| 82 | ```bash |
| 83 | # "I solved this before..." |
| 84 | cass search "TypeError: Cannot read property" --robot --days 30 |
| 85 | |
| 86 | # Cross-agent learning (what has ANY agent said about X?) |
| 87 | cass search "authentication" --robot --workspace /path/to/project |
| 88 | |
| 89 | # Agent-to-agent handoff |
| 90 | cass search "database migration" --robot --fields summary |
| 91 | |
| 92 | # Daily review |
| 93 | cass timeline --today --json |
| 94 | ``` |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | ## Command Reference |
| 99 | |
| 100 | ### Indexing |
| 101 | |
| 102 | ```bash |
| 103 | # Full rebuild of DB and search index |
| 104 | cass index --full |
| 105 | |
| 106 | # Incremental update (since last scan) |
| 107 | cass index |
| 108 | |
| 109 | # Watch mode: auto-reindex on file changes |
| 110 | cass index --watch |
| 111 | |
| 112 | # Force rebuild even if schema unchanged |
| 113 | cass index --full --force-rebuild |
| 114 | |
| 115 | # Safe retries with idempotency key (24h TTL) |
| 116 | cass index --full --idempotency-key "build-$(date +%Y%m%d)" |
| 117 | |
| 118 | # JSON output with stats |
| 119 | cass index --full --json |
| 120 | ``` |
| 121 | |
| 122 | ### Search |
| 123 | |
| 124 | ```bash |
| 125 | # Basic search (JSON output required for agents!) |
| 126 | cass search "query" --robot |
| 127 | |
| 128 | # With filters |
| 129 | cass search "error" --robot --agent claude --days 7 |
| 130 | cass search "bug" --robot --workspace /path/to/project |
| 131 | cass search "panic" --robot --today |
| 132 | |
| 133 | # Time filters |
| 134 | cass search "auth" --robot --since 2024-01-01 --until 2024-01-31 |
| 135 | cass search "test" --robot --yesterday |
| 136 | cass search "fix" --robot --week |
| 137 | |
| 138 | # Wildcards |
| 139 | cass search "auth*" --robot # prefix: authentication, authorize |
| 140 | cass search "*tion" --robot # suffix: authentication, exception |
| 141 | cass search "*config*" --robot # substring: misconfigured |
| 142 | |
| 143 | # Token budget management (critical for LLMs!) |
| 144 | cass search "error" --robot --fields minimal # path, line, agent only |
| 145 | cass search "error" --robot --fields summary # adds title, score |
| 146 | cass search "error" --robot --max-content-length 500 # truncate fields |
| 147 | cass search "error" --robot --max-tokens 2000 # soft budget (~4 chars/token) |
| 148 | cass search "error" --robot --limit 5 # cap results |
| 149 | |
| 150 | # Pagination (cursor-based) |
| 151 | cass search "TODO" --robot --robot-meta --limit 20 |
| 152 | # Use _meta.next_cursor from response: |
| 153 | cass search "TODO" --robot --robot-meta --limit 20 --cursor "eyJ..." |
| 154 | |
| 155 | # Match highlighting |
| 156 | cass search "authentication error" --robot --highlight |
| 157 | |
| 158 | # Query analysis/debugging |
| 159 | cass search "auth*" --robot --explain # parsed query, cost estimates |
| 160 | cass search "auth error" --robot --dry-run # validate without executing |
| 161 | |
| 162 | # Aggregations (server-side counts) |
| 163 | cass search "error" --robot --aggregate agent,workspace,date |
| 164 | |
| 165 | # Request correlation |
| 166 | cass search "bug" --robot --request-id "req-12345" |
| 167 | |
| 168 | # Source filtering (for multi-machine setups) |
| 169 | cass search "auth" --robot --source laptop |
| 170 | cass search "error" --robot --source remote |
| 171 | |
| 172 | # Traceability (for debugging agent pipelines) |
| 173 | cass search "error" --robot --trace-file /tmp/cass-trace.json |
| 174 | ``` |
| 175 | |
| 176 | ### S |