Documentation
¶
Overview ¶
ox-adapter-claude-code is the external adapter binary for Claude Code sessions.
It implements the ox adapter protocol, handling session file discovery, transcript parsing, hook installation, and diagnostics for Claude Code. The daemon spawns this binary in serve mode for active sessions, or one-shot for info/detect/hooks/diagnose.
session.go handles Claude Code session reading, parsing, and discovery.
Claude Code stores sessions as JSONL in ~/.claude/projects/<path>/sessions/. Each line is a JSON object with a "type" field: "human" (user), "assistant", "tool_use", "tool_result", or "summary". Timestamps are in the "timestamp" field (ISO 8601). Tool entries use "tool_name", "tool_input", and "call_id" for correlation.
Format reference: https://docs.anthropic.com/en/docs/claude-code