agent-interception

Extract and analyze tool-call events from OpenCode and Codex CLI session logs into structured evidence reports.

7|Updated May 13, 2026
One-click install
npx skills add https://github.com/medialab/spinosa --skill agent-interception-medialab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-interception
Source: https://github.com/medialab/spinosa/tree/main/workspace-template/.opencode/skills/agent-interception
Command: npx skills add https://github.com/medialab/spinosa --skill agent-interception-medialab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) and references (resource) components.

What problem does it solve? AI coding agents leave behind session logs, but reconstructing what an agent actually did — which files it read, what it searched for, which commands it ran — requires manually digging through raw JSONL rollout files. This Skill turns those logs into a normalized, auditable evidence report. ## Core Features & Use Cases - Multi-runtime log discovery: Locates session logs from OpenCode exports, Codex CLI rollout files (~/.codex/sessions/), and Spinosa session metrics, with a defined priority order. - Normalized event extraction: Shell scripts convert Codex JSONL rollouts and OpenCode export JSON into a unified event schema, pairing tool calls with their outputs. - Structured analysis: Produces analysis JSON with operation summaries, per-file access with coverage depth estimates, search keyword frequencies, and chronological tool-call timelines. - Evidence report generation: Populates a Markdown report template covering files read, searches, edits, commands, token/cost estimates, and gaps. - Use Case: After an agent session behaves unexpectedly, ask for an audit of that session to see exactly which files were read, what grep patterns were run, and the full timeline of tool calls. ## Quick Start Ask the agent to collect evidence from the most recent Codex session and produce a report of what files it read and what commands it ran.

Frequently Asked Questions about agent-interception

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit what an AI agent did in a past session?▼

Point the skill at a session ID, date, or rollout file. It discovers the relevant logs, extracts normalized tool-call events with the included scripts, and produces a Markdown evidence report covering files read, searches, edits, and a timeline.

How to extract tool calls from Codex CLI rollout files?▼

Codex stores sessions as JSONL rollouts under ~/.codex/sessions/YYYY/MM/DD/. The extract-codex.sh script pairs function_call and function_call_output records by call_id and normalizes tool names like exec_command to bash.

Does it support both OpenCode and Codex session logs?▼

Yes. It handles OpenCode exports via the spinosa export command and Codex CLI JSONL rollout files, normalizing both into a unified event schema. It can also fall back to Spinosa session metrics TSV files for summary-level data.

How accurate are the file read coverage estimates?▼

Coverage estimates are heuristic, not exact. Commands like cat or the read tool imply full coverage, head/tail imply partial reads, and grep implies under 10% of matched lines. The skill labels every estimate as heuristic rather than claiming exact percentages.

What are the limitations of agent session log analysis?▼

Analysis depends on logs already on disk; it does not install live hooks unless --setup is passed. Gaps can include unparseable lines, missing tool outputs, and incomplete data, all of which are disclosed in the report's gaps section.