runtime-session-search
Skill6 starsChanged 17 days agoMITView on GitHub
Find a past agent session by words or id in Claude, Codex, or Hermes (every profile), read its final reply, and return the native session id so orchestrate can resume it. Use when the person asks what happened before, what was tried before, how a problem was worked across sessions, where a session went, what an agent last said, or wants to pick up old work. Reads the runtimes' own session files directly, read-only; needs no hosted pane.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- capabilitySkill
- flowSkill
- logSkill
- orchestrateSkill
- to-ticketsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Run find with the person's words, or with the id they gave.
- Very specific: line 23
Run read <id> with --runtime (and --profile for Hermes) from the hit.
- Very specific: line 29
Run read on the three to five best hits, newest first.
- Very specific: line 38
Search is separate from cleanup: this skill never closes, resumes, or spawns.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
runtime-session-search
bin/runtime-session-search reads the session files each runtime keeps under the home folder and prints JSON.
Summarize the JSON for the person; never paste it raw.
It needs no other skill. The store readers ship beside it in lib/session_stores.py.
| Verb | What it does |
find "<words or id>" [--runtime claude|codex|hermes] [--since 90d|all] [--limit 15] | Hits across Claude JSONL, Codex rollouts, and Hermes state.db (main and every profile). Ids rank above words. Each hit carries session_id, store, profile, when, cwd, attach_or_resume_cmd, read_with, orchestrate_with. |
read <exact-native-id> [--runtime …] [--profile …] | The last user message and the final assistant reply, 8 KB or 120 lines at most. Reasoning and tool payloads stay out. resume_with is included. |
check-memex | Whether memex passes the exact capability check and its index is fresh. |
Steps
- Run
findwith the person's words, or with the id they gave. Done when the status isfound,not_found, orchoice_required. - On
choice_required, show the choices and ask for the runtime or the exact id. Done when one id is left. - Run
read <id>with--runtime(and--profilefor Hermes) from the hit. Done when the status isreadorno_reply. - Tell the person what the session last said, and give the
resume_withcommand or hand the id toorchestrate. Done when they have the id and the next command.
Question mode: when the person asks a question about past work ("what did we try for the login bug?") rather than for one session:
- Turn the question into two or three short word searches, and run
findfor each, with--since allif the work may be older than 90 days. Done when you hold the hits from every search. - Run
readon the three to five best hits, newest first. Done when each read isreadorno_reply. - Answer the question in a few lines. Name the session id and date behind each claim, and say what you did not find. Done when every claim cites a session id.
Laws
- Native files are truth:
~/.claude/projects,~/.codex/sessions,~/.hermes/state.db, and~/.hermes/profiles/*/state.db, read-only.--stores-root(orRUNTIME_SESSION_SEARCH_STORES) points at another home folder. - memex is a speed layer only when
check-memexpasses and its index is not older than the newest transcript by a day. Otherwise the built-in readers run. memex is optional; the skill works without it. - Missing or ambiguous matches stay explicit:
not_found,choice_required(several ids match a prefix, or several stores hold the id),no_reply. Never guess; ask for the exact id or runtime. - Saved text never proves task success (
task_success: not_inferred). - Search is separate from cleanup: this skill never closes, resumes, or spawns. Hand the id to
orchestrate(--session-id) for more work, or toherdr resume <id>when the herdr skill is on the shelf.
Gotchas
- A runtime that is not installed has no folder. Its store is skipped and
adapter_notessays so; that is not an error. --sincedefaults to 90 days for word searches. Use--since allfor older work. An id search ignores the window.- A Codex thread that the Codex app owns resumes with
codex exec fork, notcodex exec resume.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

