Sessions
A session is a record of one agent invocation or work thread. APX-native sessions are Markdown files stored locally — never committed. APX also understands sessions created by Claude Code and Codex, giving you a single interface to find and resume work regardless of which engine started it.
Sessions vs. conversations
Section titled “Sessions vs. conversations”| Concept | What it is | Where it lives |
|---|---|---|
| Session | High-level record — title, status, result, timestamps | ~/.apx/projects/<id>/agents/<slug>/sessions/ |
| Conversation | The raw LLM message thread | ~/.apx/projects/<id>/agents/<slug>/conversations/ |
| External session | Session file owned by Claude or Codex | ~/.claude/ or ~/.codex/ |
Sessions are the durable artifact you come back to; conversations are the low-level turn-by-turn log that the engine reads.
Engine coverage
Section titled “Engine coverage”APX cross-engine commands scan these locations:
| Engine | Where APX looks |
|---|---|
apx | ~/.apx/projects/<apx_id>/agents/<slug>/sessions/*.md |
claude | ~/.claude/projects/<encoded-cwd>/<id>.jsonl |
codex | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
Engines that are not installed are silently skipped.
Finding sessions
Section titled “Finding sessions”Start with apx session find whenever you remember the topic but not the id:
apx session find "mejorar interfaz web" # title search, cross-engine, newest firstapx session find "sidebar" --deep # also search transcript contentapx session find "deploy" --engine codex # restrict to one engineapx session find "api" --dir /path/to/repo # scope to one directoryapx session find "login" --limit 5 --json # machine-readable outputThe output includes a ready-to-run block of summary/ask/resume commands pre-filled with the
top hit’s id — copy-paste straight through without touching the id manually.
Listing sessions
Section titled “Listing sessions”apx sessions list # every engine, every known projectapx sessions list --engine claude # Claude sessions onlyapx sessions list --engine codex --limit 10apx sessions list --project my-app # all engines, one registered projectapx sessions list --dir /path/to/repo # all engines, one directory$ apx sessions list Claude Code ~/code/acme-store 06-14 09:32 a1f3c92e Review open PRs and summarize them 06-13 17:04 7b20de54 Wire checkout API to Stripe 06-12 11:48 d9c81a07 Fix flaky cart total test Codex ~/code/data-pipeline 06-14 08:15 c4e7f1a2 Refactor ingestion retry loop 06-11 20:39 8a3b6d50 Add backfill CLI flag • 5 sessions across 2 engines
APX-native session commands
Section titled “APX-native session commands”These manage the .md session files that APX writes under ~/.apx/:
apx session new <slug> --title "Investigate bug X" # create a session fileapx session list # all agents in the current projectapx session list <slug> # one agent's sessionsapx session get <id> # metadataapx session get <id> --body # full markdown bodyapx session update <id> --status "in progress"apx session close <id> --result "Fixed in PR #42"apx session check # exit 1 if any active session existsapx session close-stale # auto-close sessions older than 1 hourapx session compact <slug> # summarize a conversation to diskCross-engine resume
Section titled “Cross-engine resume”apx session resume <id> # auto-detect engine, show metadataapx session resume <id> --tail 32k # print last 32 KB of transcript (no daemon needed)apx session resume <id> --full # dump entire transcriptapx session resume <id> --summary # LLM summary via super-agent (daemon required)apx session resume <id> --continue # spawn native CLI (claude --resume / codex resume)apx session resume <id> --into apx:slug # seed a new APX session from the summaryapx session resume <id> --engine claude # skip auto-detect, use one engineIf the same id appears in multiple engines, APX prints all matches and asks you to re-run with
--engine <id> to disambiguate.
Reading session content
Section titled “Reading session content”# Local APX sessionsapx session get <id> # metadataapx session get <id> --body # full markdown
# Any engineapx session get <id> --engine claude --full # full Claude JSONLapx session get <id> --engine codex --tail 16kapx session get <id> --any --full # search every engine, error on collisionSummarize and ask
Section titled “Summarize and ask”These two commands require the daemon and super_agent.enabled: true in ~/.apx/config.json:
apx session summary <id> # 4-bullet LLM summaryapx session summary <id> --max-chunks 8 # bound cost on large transcripts
apx session ask <id> "¿qué cambios al sidebar?" # Q&A over the transcriptapx session ask <id> "what files changed?" --max-chunks 30Large transcripts are map-reduced: each ~48 KB chunk is mined for relevant notes, then a final pass synthesizes the answer. Binary noise (base64 image payloads) is stripped before chunking.
Daemon requirements
Section titled “Daemon requirements”| Command | Daemon required? |
|---|---|
apx session find | No |
apx sessions list | No |
apx session get (any mode) | No |
apx session resume (metadata, tail, full, continue) | No |
apx session resume --summary / apx session summary | Yes |
apx session ask | Yes |
apx session resume --into apx:slug (summary part only) | Yes |
The daemon starts automatically when needed — you do not have to launch it manually.