Skip to content

ash sessions

Manage conversation history and sessions.

Usage

Terminal window
uv run ash sessions <action> [OPTIONS]

Actions

ActionDescription
listList recent sessions
viewView a session with full conversation
searchSearch messages across sessions
clearClear all session history

Options

OptionDescription
--query, -qSearch query or session key
--limit, -nMaximum entries to show (default: 20)
--force, -fSkip confirmation prompts
--verbose, -vShow full tool outputs (for view)

list

List recent sessions:

Terminal window
uv run ash sessions list

Options:

OptionDefaultDescription
--limit, -n20Maximum sessions to show

Output:

┌────────────────────┬──────────┬───────────────┬──────────┬──────────────────┐
│ Key │ Provider │ Chat ID │ Messages │ Created │
├────────────────────┼──────────┼───────────────┼──────────┼──────────────────┤
│ telegram_-542... │ telegram │ -54212345 │ 24 │ 2024-01-15 10:30 │
│ cli_default │ cli │ default │ 156 │ 2024-01-14 09:15 │
└────────────────────┴──────────┴───────────────┴──────────┴──────────────────┘

view

View a session with full conversation and tool calls:

Terminal window
uv run ash sessions view -q <session-key>

The session key can be a partial match:

Terminal window
# View Telegram session (fuzzy match)
uv run ash sessions view -q telegram_-542
# Show full tool outputs
uv run ash sessions view -q telegram_-542 -v

Output shows:

  • Messages with timestamps
  • Tool calls with their results
  • Context compaction events
  • User/assistant roles with formatting

Search messages across all sessions:

Terminal window
uv run ash sessions search -q "docker"

Options:

OptionDescription
--query, -qSearch query (required)
--limit, -nMaximum results (default: 20)

Output:

┌───────────────┬──────────────────┬───────────┬────────────────────────────────┐
│ Session │ Time │ Role │ Content │
├───────────────┼──────────────────┼───────────┼────────────────────────────────┤
│ telegram_-542 │ 2024-01-15 10:30 │ user │ How do I run docker commands...│
│ cli_default │ 2024-01-14 09:15 │ assistant │ To build a docker image... │
└───────────────┴──────────────────┴───────────┴────────────────────────────────┘

clear

Clear all session history:

Terminal window
uv run ash sessions clear

Force clear without confirmation:

Terminal window
uv run ash sessions clear --force

Storage

Sessions are stored as JSONL files in ~/.ash/sessions/:

~/.ash/sessions/
├── telegram_-54212345/
│ ├── context.jsonl # Full LLM context (messages, tool calls, results)
│ └── history.jsonl # Human-readable conversation only
├── cli_default/
│ ├── context.jsonl
│ └── history.jsonl
└── ...

Each session directory contains:

  • context.jsonl - Full context including tool calls, results, and compaction events
  • history.jsonl - Just the messages for easy reading

Examples

View recent sessions:

Terminal window
uv run ash sessions list --limit 5

Find conversations about Python:

Terminal window
uv run ash sessions search -q "python"

View a specific session:

Terminal window
uv run ash sessions view -q cli_default

See Also

  • Memory - Context and storage settings