TMA1 Session Search (Codex)
TMA1 keeps every agent session on this machine — yours and other agents' — in a local database. This skill is the read path: find the session, then read it.
Invocation
/tma1-search retry backoff # keyword search, this project, last 7 days
/tma1-search flaky test --agent claude # only Claude Code's sessions
/tma1-search migration --days 30 # widen the window
/tma1-search pipeline --all-projects # every project
/tma1-search --session 3d8f1d0a # read one session directly
--session takes a full id or a prefix of 6+ characters. Do not
infer a session id from a bare token: commit hashes look identical, and
oc: / cp: ids don't look like hex at all. Anything not behind
--session is search text.
Workflow
- Search — call the
tma1MCP server'ssearch_sessionstool:query: everything that isn't a flagagent_source:--agentvalue (claude→claude_code,openclaw,copilot→copilot_cli,self); omit for every agentsince_min:--days N× 1440; omit for the 7-day defaultproject:"*"with--all-projects; otherwise omit
- Report the matches with their snippets so the user can pick. One obvious hit and a clear question → go straight to step 3.
- Read —
get_session_transcriptwith the chosensession_id.has_more: truemeans older messages exist; call again with the returnednext_offsetif the answer isn't in this page. - Answer with quotes from the earlier session, not a summary.
Reading the response
sessions[]—session_id,agent_source,last_activity_ago,hit_count,snippets[](a window around each match).match_mode—termis the indexed pass: whole words, case-sensitive.substringmeans that pass found nothing, so the search widened to a case-folded substring scan: noisier results, say so.scope_truncated: true— more sessions exist in the window than were scanned; narrow with--agentor--days.note— only when nothing matched. Report the silence; don't invent a plausible past session.
The indexed pass matches whole words and is case-sensitive: Cwd does not
find peerCwdFilter, and neither does peercwdfilter. Search the
identifier as written. The substring fallback folds case, which is what
rescues a mistyped query.
Related tools
- Browsing by agent rather than keyword → the
tma1-peerskill. - Aggregates over the raw tables (cost by model, tool failure rates) →
the
tma1skill'sexec_query.