[skills] Add auto-capture-codex adapter#389
Conversation
New Codex CLI adapter for the auto-capture skill — the Codex sibling of auto-capture-claude-code. Captures Codex sessions to Open Brain automatically at session end. Codex stores transcripts as "rollout" JSONL (event_msg records with payload.type user_message/agent_message), a different schema from Claude Code, so it needs its own parser — the Claude Code adapter parses zero turns from a Codex rollout and captures nothing. Codex has no SessionEnd event, so the hook runs on Stop and uses a debounced, per-session-state-guarded capture to fire once (~120s after the last turn), approximating session end. Resolves the rollout by session_id (embedded in the filename), with stdin-path and newest-rollout-for-cwd fallbacks. Caps the payload at 24k chars to stay under the ingest embedding token limit. Includes SKILL.md, README.md, metadata.json, and the hook script (Node 18+, no dependencies). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MvLAf6xzHoGeGE9h3PWemh
OB1 PR Gate✅ Folder structure — All files are in allowed directories Result: All 15 checks passed! Ready for human review. Post-Merge TasksThese don't block merge — they're reminders for admins after this PR lands.
|
Contribution Type
/skills)What does this do?
Adds auto-capture-codex — the Codex CLI sibling of
auto-capture-claude-code. It automatically captures Codex sessions to Open Brain at session end.Why a separate adapter: Codex stores transcripts as "rollout" JSONL (
event_msgrecords withpayload.type == "user_message"/"agent_message") — a different schema from Claude Code. The Claude Code adapter parses zero turns from a Codex rollout and silently captures nothing, so Codex needs its own parser.Design notes:
SessionEndevent, so the hook runs onStopand uses a debounced, per-session state-guarded capture to fire once (~120s after the last turn), approximating session end.session_id(Codex embeds it in the rollout filename), with stdin-path and newest-rollout-for-cwdfallbacks.Requirements
Codex CLI, Node.js 18+, a deployed Open Brain (
open-brain-rest/ingest+MCP_ACCESS_KEY). Depends on theauto-captureskill (declared in metadata). No new dependencies.Checklist
README.mdwith prerequisites, step-by-step install, and expected outcomemetadata.jsonhas all required fieldsauto-capture; declared in metadata and linked in the README🤖 Generated with Claude Code