| name | searching-history |
| description | Search past Claude Code sessions to recall prior solutions, commands, fixes, and decisions. Use when the user references earlier work ("how did I fix", "last time we", "pick up where we left off", "a few months ago", "what was that … I set up", "didn't I once"). |
| argument-hint | <search-query> |
glhf — Conversation History Search
Search your Claude Code conversation history using hybrid search (text + semantic).
How to run it (read this first)
Figure out the search query yourself, then run glhf search — never run it empty and never bounce the question back to the user.
- Explicit
/glhf <query> → use $ARGUMENTS as the query: glhf search "$ARGUMENTS" --compact
- Auto-triggered from the conversation →
$ARGUMENTS is empty. Derive concise search terms from what the user is trying to recall (the topic, error text, command, or project they referenced) and run the search with those. Do not ask them to restate it.
Example: user says "what was that cargo alias I set up?" → run glhf search "cargo alias" -t Bash --compact. Then read the hits and answer; chain into glhf session <id> --summary if you need fuller context.
Quick Examples
glhf search "authentication" --compact
glhf search "docker" -t Bash --compact
glhf search "bug" -p myapp --since 1w --compact
glhf search "failed" --errors --compact
glhf recent -l 10
glhf session abc123 --summary
glhf session abc123 --limit 30
Commands
| Command | Purpose |
|---|
search | Find content across all sessions |
session | View a specific session's content |
recent | List recent sessions |
status | Show index stats |
index | Update index (incremental by default) |
Search Flags
| Flag | Purpose |
|---|
--compact | One-line output, fewer tokens |
-l/--limit | Max results to return (default 10) |
-t/--tool | Filter by tool (Bash, Read, Edit, Grep, etc.) |
-p/--project | Filter by project name (substring match, . = cwd) |
--since | Time filter (1h, 2d, 1w, or date) |
--errors | Only show error results |
--json | Machine-readable JSON output |
Session Flags
| Flag | Purpose |
|---|
--summary | Show session summary without content |
-l/--limit | Show only first N messages |
--json | Machine-readable JSON output |
Recommended Patterns
Find past solutions:
glhf search "problem description" --compact
glhf search "specific keyword" --compact
glhf session <id> --summary
Recall commands:
glhf search "git rebase" -t Bash --compact
glhf search "cargo" -t Bash --since 1w --compact
Find errors:
glhf search "error" --errors --since 1d --compact
Browse recent work:
glhf recent -l 10
glhf recent -p myproject
Tips
- Always use
--compact — significantly reduces output tokens
- Chain commands: search, find session ID in output, then
glhf session <id> --summary for full context
- Use
-p . to filter to current project
- Use
--json when piping to other tools or processing programmatically
- Index is incremental —
glhf index only re-processes changed files. Use --full to rebuild, --skip-embeddings for text-only indexing
- Search shows staleness hints — if the index is behind, it prints how many files changed. Run
glhf index to update