code-yeongyu/oh-my-openagent / packages/shared-skills/skills/coding-agent-sessions
coding-agent-sessions
VerifiedFinds, 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.
references/codex.md
View on GitHub# Codex Sessions
Codex has two useful surfaces:
- `$CODEX_HOME/state_*.sqlite` stores thread metadata.
- `$CODEX_HOME/sessions/**/rollout-*.jsonl` and archived rollout files store event transcripts.
Use the broad finder for Codex discovery:
```bash
python3 -B scripts/find-agent-sessions.py list --platform codex --limit 10
python3 -B scripts/find-agent-sessions.py search "deploy" --platform codex
python3 -B scripts/find-agent-sessions.py search --query "deploy" --query "token usage" --platform codex --workers 32
python3 -B scripts/find-agent-sessions.py get <session-id> --platform codex
```
Important filters: `--from`, `--to`, `--cwd`, `--model`, `--root`, `--limit`, and `--include-subagents`.
## Spawned (subagent) threads
Codex subagent threads are ordinary rows in `threads` with their own rollout files. Two linkage sources:
- `thread_spawn_edges(parent_thread_id, child_thread_id, status)` — authoritative parent→child table.
- `threads.source` — `cli` / `exec` / `vscode` for user-started threads, or JSON for spawned ones:
- `{"subagent": "review"}`, `{"subagent": "memory_consolidation"}` — built-in side threads.
- `{"subagent": {"thread_spawn": {"parent_thread_id": "...", "depth": 1, "agent_nickname": "Tesla", "agent_role": "explorer"}}}` — collab/multi-agent spawns (depth can exceed 1: children spawn grandchildren).
`threads` also carries `agent_nickname`, `agent_role`, `model`, `first_user_message`, `tokens_used`. Without the SQLite DB, the same linkage is in each rollout file's first line: `type: "session_meta"` whose `payload` has `id`, `cwd`, `model_provider`, `forked_from_id`, and the same `source.subagent.thread_spawn` object.
The finder maps these to `parent_id` and `agent = "nickname (role)"`; `get <parent-thread-id>` lists children under `subagents`, and `get <child-thread-id>` returns the child's rollout events.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |