Skip to content
cccskills
FreePublished on GitHub

coding-agent-sessions

Search local session histories across Codex, Claude Code, OpenCode, and other coding agents. Find earlier requests, inspect transcripts and child sessions, and reconstruct past work using recorded evidence, with filters for dates, projects, platforms, and models.

OriginalShow the original description

Finds, reads, and reconstructs coding-agent sessions across Codex, Claude, OpenCode, OMO/Senpi, and other local agent logs. Use when asked to find or search past sessions, transcripts, or subagent runs, or to recover what an earlier session did.

See how to install

Good for

  • Finding work done a few days ago
  • Checking whether a migration was already completed
  • Reviewing tasks delegated to child agents
  • Searching histories across multiple agent products

Files included (34)

  • SKILL.md10.8 KB
  • .gitignore90 B
  • .npmignore131 B
  • AGENTS.md3.9 KB
  • agents/openai.yaml226 B
  • pyrightconfig.json157 B
  • references/all-platforms.md5.9 KB
  • references/claude.md2.3 KB
  • references/codex.md1.8 KB
  • references/opencode.md2.5 KB
  • references/senpi.md1.8 KB
  • scripts/agent_sessions/__init__.py35 B
  • scripts/agent_sessions/aside_scanner.py4.9 KB
  • scripts/agent_sessions/claude.py2.4 KB
  • scripts/agent_sessions/cli.py10.9 KB
  • scripts/agent_sessions/codex.py3.8 KB
  • scripts/agent_sessions/file_scanners.py12.1 KB
  • scripts/agent_sessions/jsonio.py1.3 KB
  • scripts/agent_sessions/kiro_scanner.py3.1 KB
  • scripts/agent_sessions/opencode.py9.8 KB
  • scripts/agent_sessions/pi_family.py1.8 KB
  • scripts/agent_sessions/scanners.py3.5 KB
  • scripts/agent_sessions/sqlite_optional_scanners.py7.5 KB
  • scripts/agent_sessions/sqlite_scanners.py5.9 KB
  • scripts/agent_sessions/timeparse.py1.9 KB
  • scripts/agent_sessions/transcript.py5.6 KB
  • scripts/agent_sessions/types.py1.7 KB
  • scripts/find-agent-sessions.py785 B
  • scripts/tests/test_agent_sessions.py16.5 KB
  • scripts/tests/test_aside_scanner.py5.4 KB
  • scripts/tests/test_cli_contract.py7.5 KB
  • scripts/tests/test_extended_scanners.py11.3 KB
  • scripts/tests/test_optional_sqlite_scanners.py3.4 KB
  • scripts/tests/test_pi_family_scanners.py6.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Coding Agent Sessions

Find local coding-agent sessions across agent products before answering from memory. Prefer the bundled finder for broad cross-platform search, then read the selected session or raw file when you need exact evidence.

PHASE 0 - PLATFORM ROUTER

  1. IF the user names a platform, load its reference first.

    PlatformRead
    Codex / OpenAI Codex CLIreferences/codex.md
    Claude Code / Claude Desktop historiesreferences/claude.md
    OMO / Senpi / pi coding-agent logsreferences/senpi.md
    oh-my-pi (omp, ~/.omp) and gajae-code (gjc, ~/.gjc) logsreferences/senpi.md
    OpenCode / oh-my-openagent (formerly oh-my-opencode) storagereferences/opencode.md
    OpenClaw, Droid, Amp, Gemini, Kimi, Qwen, Codebuff, Roo/Kilo/Cline, Kodu, Cursor CLI, Aider, Kiro, Goose, Hermes, Crush, Zed, Asidereferences/all-platforms.md
    Unknown / "any session" / cross-agent searchreferences/all-platforms.md
  2. Run the broad finder first unless the user gave an exact file path. For fuzzy recall, expand the query first.

When the user remembers a task vaguely ("that OpenCode bug", "the dashboard PR", "when did we fix X"), derive 3-6 short query lanes before searching: product/tool aliases, repo/package names, exact error text, issue/PR/session IDs, English/Korean phrasing, and likely verbs such as fix, review, plan, deploy, or merge. Run the lanes together with repeated --query so match_reasons shows which wording found the hit.

python3 scripts/find-agent-sessions.py list --limit 20
python3 scripts/find-agent-sessions.py find "commit" --from 7d --platform senpi --platform opencode
python3 scripts/find-agent-sessions.py find "proxy" --platform openclaw --platform droid --platform amp
python3 scripts/find-agent-sessions.py find "refactor" --platform oh-my-pi --platform gajae-code
python3 scripts/find-agent-sessions.py find --query "deploy" --query "token usage" --workers 64
python3 scripts/find-agent-sessions.py find --query "opencode bug" --query "fix opencode" --query "OpenCode parent session" --include-subagents --workers 64
python3 scripts/find-agent-sessions.py read <session-id>

Use python instead of python3 on systems where that is the available executable.

  1. Use explorer-style parallel lanes when one query batch is not enough.

If scope is broad (multi-month, many repos/platforms, or a vague "what happened with X"), split independent searches by names/errors, repos/cwds, platforms/models, and time windows. Use available subagent/delegation tools for these lanes when they exist; otherwise run the finder calls in parallel. Merge candidates by id/path, then read the most likely sessions.

  1. Read details from search results before ad hoc digging. Search results include detail_hint; run that read <session-id> --platform <platform> command to see the first user prompt, last user prompt, events, and child sessions together.

  2. Verify by opening raw transcripts for claims. The finder normalizes formats; the raw path remains the source of truth.

Output Contract

The finder prints JSON for stdout and jq. Every result includes:

FieldMeaning
platformRegistered platform key such as codex, claude, senpi, oh-my-pi, gajae-code, opencode, openclaw, droid, amp, kodu, cursor-cli, aider, roo-code, kilo-code, kilo-cli, kiro, or aside
idSession ID or stable file-derived ID
pathRaw transcript/index file
cwdWorking directory when recoverable
created_at, updated_atISO-like timestamps when recoverable
provider, modelModel metadata when recoverable
first_user_messageFirst user prompt preview (for subagents: task description + delegated prompt)
last_user_messageLast user prompt preview when recoverable
usageToken/cost clues when present in the platform log
parent_idParent session/thread ID when this is a subagent or child session, else null
agentSubagent label (Claude agentType, Codex nickname (role), OpenCode agent name)
subagent_countNumber of child sessions spawned by this session
detail_hintReady-to-run read command for detailed inspection
match_reasonsSearch-only array explaining which field/content matched each query

Each match_reasons entry includes query, platform, field, and snippet, so you can tell which platform matched and what content caused the hit without opening every transcript. field is user_message when the query matched a user prompt that the first_user_message/last_user_message previews do not cover, such as a prompt in the middle of the session.

Filters

list and search share these filters:

FilterMeaning
--platformRepeatable platform filter; pass one platform per flag
--rootExtra root to scan, repeatable
--from, --toDate bounds: YYYY-MM-DD, YYYY-MM, YYYY, today, yesterday, 7d
--cwdWorking-directory substring
--modelModel substring
--limitMaximum results
--queryRepeatable search query; multiple queries return per-query groups plus a de-duplicated merged result list
--workersParallel worker count for platform scans, transcript parsing, OpenCode message joins, and multi-query matching
--include-subagentsInclude subagent/child sessions as standalone list/search results (hidden by default)

When --platform is omitted, the finder searches every registered platform in parallel. Each optional platform first probes fixed, known transcript roots and returns immediately when the product has no local store, so broad default searches stay cheap. Use repeatable flags such as --platform openclaw --platform droid only when narrowing. Comma-separated platform values are intentionally unsupported.

For OpenCode, the finder uses opencode db path plus direct SQLite queries first, then opencode session list --format json as a fallback. It avoids heavy messages/ or parts/ scans during normal list/search, and only falls back to file joins when the OpenCode DB/CLI is unavailable or explicit --root values request a nonstandard store.

Usage-only sources such as Copilot OTEL, Mux, Antigravity tokscale cache rows, Synthetic provider retagging, and Cursor IDE usage CSV are excluded from default transcript search because they do not reconstruct user prompts.

Subagent / Child Sessions

list and find/search return main sessions only by default, each annotated with subagent_count. read <main-session-id> (alias: get) always returns a prompts object and a subagents array containing every child session (id, agent label, parent_id, prompt preview, raw path), so opening a main session reveals its whole delegation tree. read <child-id> works too and returns that child's own events.

PlatformWhere children liveLinkage
Claude Codeprojects/<proj>/<session-id>/subagents/agent-*.jsonl (Task tool) and .../subagents/workflows/wf_*/agent-*.jsonl (Workflow)Directory name = parent session ID; agent-*.meta.json holds agentType + task description
CodexRegular threads in state_*.sqlite + own rollout JSONLthread_spawn_edges table and threads.source / rollout session_meta.payload.source.subagent.thread_spawn
OpenCodeRegular sessions in opencode.db / storage/session/session.parent_id column / parentID field; agent column names the subagent

When the user asks whether some specific work was ever done, search with --include-subagents — delegated work often lives only in child transcripts, not in the main session. Workflow journal.jsonl files are orchestration logs, not sessions.

Codex Notes

For Codex sessions, use the same broad finder. It reads state_*.sqlite, rollout JSONL, and archived rollout files:

python3 scripts/find-agent-sessions.py list --platform codex --from 7d
python3 scripts/find-agent-sessions.py find "deploy" --platform codex
python3 scripts/find-agent-sessions.py read <session-id> --platform codex

Use references/codex.md for Codex storage details.

Troubleshooting

ProblemFix
Missing Codex sessionsSet CODEX_HOME or pass --root /path/to/.codex.
Missing oh-my-pi / gajae-code sessionsThose stores live in ~/.omp/agent/sessions and ~/.gjc/agent/sessions. For a custom PI_CONFIG_DIR / PI_CODING_AGENT_DIR, pass that agent dir with --root.
Missing OMO / Senpi sessionsThe senpi platform searches ~/.omo/agent/sessions, ~/.senpi/agent/sessions, and ~/.pi/agent/sessions (plus matching profile roots). Pass a nonstandard agent directory with --root.
Missing OpenCode sessionsPass the data dir that contains messages/ and parts/, often ~/.opencode or ~/.local/share/opencode.
Missing Claude sessionsSearch ~/.claude/projects, ~/.claude/transcripts, and ~/.claude/pre-compact-session-histories; use --root for nonstandard config dirs.
Missing Aside sessionsThe Aside browser agent stores per-user data under ~/.aside/u/<n>/ (sessions/<date>_<id>/messages.jsonl transcripts + a state.db index; agents/*/sessions/ is just a hardlink mirror). Pass --root for a nonstandard .aside dir or an exported user dir.
Missing optional platform sessionsCheck references/all-platforms.md for the exact local store. For project-local tools such as Aider, pass --root /path/to/workspace if the repo is outside the bounded default roots.
Date filter misses local sessionsTimestamps are compared as UTC instants when parseable; otherwise file mtime is used.
Search is slowNarrow with repeated --platform flags or date/cwd filters. Optional stores are probed before parsing; avoid passing your whole home as --root unless you really want every bounded project-local scan.

Activation

Use this skill for any request to find, read, or inspect a local coding-agent session, regardless of product name — including memory-recall questions ("what did I work on a few days ago", "did we already migrate X", "when did I fix Y"). If the user only says "that session where we did X", do not rely on one literal query: expand to multiple discriminative terms first, add --include-subagents when the work may have been delegated, then narrow by --platform, cwd, model, and time (--from 7d for "a few days ago"). Prefer the detail_hint from the chosen search result for the next read step. If the first query batch is still ambiguous, use explorer-style lanes by keyword, repo/cwd, platform/model, and time window before summarizing.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ast-grep

FreeSummary

Finds and rewrites code by its syntax structure across 25 languages. Use it to locate matching calls or declarations, preview bulk changes, and run reusable YAML rules that check code or apply fixes.

  • Finding calls or functions with a specific structure
  • Previewing and applying bulk code changes
  • Checking code with reusable YAML rules
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

browser

FreeSummary

Automate forms, clicks, screenshots, and website checks in a browser where you are already signed in. A separately launched browser also supports scraping and network capture, while login or verification steps can be handed to a person.

  • Fill forms on websites where you are already signed in
  • Capture screenshots and check website behavior
  • Record network traffic in a separately launched browser
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

codex-qa

FreeSummary

Test omo Codex Light edition in an isolated environment using real Codex and a local mock model. Verify installation, plugin hooks, and terminal startup, with captured evidence and no calls to a real model API.

  • Verify installation and config.toml changes in isolation
  • Confirm plugin hooks run during a real Codex turn
  • Check terminal interface startup
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

comment-checker

FreeSummary

Help Codex respond to automatic warnings about comments after code edits. It explains when the checker runs and directs Codex to fix the flagged comment or explain it before continuing with other work.

  • Understand a comment warning after an edit
  • Fix a comment flagged by the checker
  • Explain a flagged comment before continuing
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

dag-library

FreeSummary

Saves multi-agent workflows as named JSON files and runs them again without copying their definitions. Handles placeholders and run keys so repeated workflows can create fresh runs or deliberately reuse an existing run.

  • Saving a workflow for repeated audits
  • Running a saved workflow by name
  • Sharing workflow definitions within a project
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

data-scientist

FreeSummary

Analyze CSV, Parquet, and JSON files to answer questions through grouping, joins, cleaning, time series, and charts. Chooses DuckDB or Polars and a suitable processing location based on the task and available memory.

  • Summarizing and joining data files
  • Exploring trends and distributions
  • Cleaning data before analysis
code-yeongyu/oh-my-openagent70.2KUpdated Oct 18, 2026

See all skills by code-yeongyu

Report a problem with this skill