Back
14/61
Lesson 14
8 min

CASS: Learning from History

Search across all past agent sessions

New to ACFS?

Complete the setup wizard first to get the most from these lessons.

Go to Choose Your OS
Goal

Search across all past agent sessions to reuse solved problems.

What Is CASS?

CASS (Coding Agent Session Search) indexes all your past agent conversations—Claude Code, Codex, Gemini, Cursor, and more—so you can find solutions to problems you've already solved.

It's like having a searchable memory of everything your agents have ever done across all projects.

Multi-Agent Index

Claude, Codex, Gemini, Cursor, ChatGPT sessions

Full-Text Search

Search across code, prompts, and responses

Cross-Project

Find solutions from any project or machine

Fast Retrieval

Instant results with context snippets

Why Use CASS?

You've likely solved many problems before with agents. Without CASS:

✗

You hit an error you've seen before but can't remember the fix

✓

Search CASS for the error message → find the exact solution

✗

New project needs auth—you've implemented it before

✓

Search 'authentication' → find your past implementation

✗

Different agent solved a similar problem better

✓

Search across all agents → find the best approach

Note
CASS helps you avoid re-solving the same problems. Your past agent sessions are a goldmine of solutions!

Essential Commands

Important: Never run bare cass—it launches a TUI that may block your session. Always use --robot or --json.

Check indexing status
Search with machine-readable output
View a specific message
View with context (3 messages before/after)
See what agents are indexed
Full documentation for AI agents

Search Patterns

Basic Search

Find any mention of a term

bash
cass search "database migration" --robot

Filter by Agent

Only search Claude Code sessions

bash
cass search "error handling" --agent claude --robot

Recent Only

Search last 7 days

bash
cass search "docker" --days 7 --robot

Minimal Output

Just essential fields

bash
cass search "auth" --robot --fields minimal --limit 10

Error Messages

Find solutions to specific errors

bash
cass search "Cannot read property of undefined" --robot

The Search Workflow

Cross-Agent Session Search

Find past solutions for specific error messages across all agent sessions

847 sessions indexed
cass-terminal

Understanding Output

CASS returns structured results with session info and snippets:

json
$ cass search "PostgreSQL connection" --robot --limit 2
{
"hits": [
{
"source_path": "/home/ubuntu/.claude/projects/.../session.jsonl",
"line_number": 87,
"agent": "claude_code",
"workspace": "/projects/myapp",
"snippet": "...fixed the PostgreSQL connection by setting pool_size=20...",
"score": 0.92
},
{
"source_path": "/home/ubuntu/.codex/sessions/2025-01-12.jsonl",
"line_number": 45,
"agent": "codex",
"workspace": "/projects/backend",
"snippet": "...PostgreSQL connection string format: postgres://user:pass...",
"score": 0.85
}
],
"_meta": { "query": "PostgreSQL connection", "took_ms": 42 }
}
Pro Tip
Use cass expand with the source path and line number to see the full conversation context!

Best Practices

Use specific search terms

'PostgreSQL timeout error' is better than just 'error'

Filter by agent for focused results

If you remember which agent solved it, use --agent

Check multiple solutions

Different agents may have solved it differently

Use --days for recent context

Older solutions might use outdated patterns

Try It Now

bash
1# Check your indexing status
2$ cass health
3
4# Search for a common pattern
5$ cass search "import" --robot --limit 3
6
7# View full documentation
8$ cass robot-docs guide

Ready to level up?

Mark complete to track your learning progress.