Session search

From mikeyobrien/rho · View interactive version

Session search is an AI agent skill from the GitHub repository mikeyobrien/rho. Search across pi session JSONL logs (user prompts, tool calls, results). Uses the session-digest tool and ripgrep for fast triage.

How to use this skill

Skill file

Session Search

Search historical pi sessions stored under ~/.pi/agent/sessions/.

This skill assumes the session-digest helper exists at ~/bin/session-digest.

Where sessions live

On this Termux setup, sessions are typically stored in:

If you are unsure which directory is active, list the session roots:

ls -la ~/.pi/agent/sessions

Method A (recommended): generate digests, then search the digests

session-digest parses session JSONL into readable markdown and writes files to:

1) Generate digests for a time window:

# last 7 days
session-digest --week >/dev/null

# or a single date
session-digest 2026-02-04 >/dev/null

# or all history (can be slow)
session-digest --all >/dev/null

2) Search the digest markdown:

rg -n "<query>" ~/.rho/digests

Notes:

Method B: direct grep over raw JSONL (fastest, messiest)

Search the raw session logs directly:

SESSION_ROOT=~/.pi/agent/sessions/--data-data-com.termux-files-home--
rg -n --hidden "<query>" "$SESSION_ROOT"/*.jsonl

Useful variants:

# show a little context around matches
rg -n -C 2 "<query>" "$SESSION_ROOT"/*.jsonl

# case-insensitive
rg -n -i "<query>" "$SESSION_ROOT"/*.jsonl

Common queries

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.