Reconstructing AI Agent Activity: Two New Scripts for Forensic Review, (Thu, Oct 8th)
SANS published two Python scripts that reconstruct OpenCode and Hermes AI agent activity for forensic review.
A SANS Internet Storm Center diary introduces two Python scripts for reconstructing activity from AI coding agents during incident response. opencode-chat-replay.py turns OpenCode’s SQLite session store, by default ~/.local/share/opencode/opencode.db, into Markdown, JSON, or JSONL transcripts including tool calls and token data. hermes_forensic_extract.py pulls Hermes conversation records, model usage, API request dumps, and application logs. Both support time filters, copy database sidecars before read-only access, and are intended for forensic review rather than replaying agent actions.
- opencode-chat-replay.py rebuilds OpenCode transcripts from its SQLite database.
- hermes_forensic_extract.py collects chats, model usage, API dumps, and logs.
- Both scripts need Python 3.10 or later and use only the standard library.
- They copy SQLite files and open snapshots read-only to avoid altering evidence.
- Organizations
- SANS
From the original article
7 min read at isc.sans.eduWe just did a major update to FOR577 and added a lot of new material on day 5 about investigating AI usage in incident response. In the new material we dicsuss 8&#;x26;#;xc2;&#;x26;#;xa0;of the most popular AI coding assistants and&#;x26;#;xc2;&#;x26;#;xa0;agents including Claude Code, Codex, Gemini CLI, Cursor, Copilot, Warp, Windsurf, and Qwen Code.
isc.sans.edu
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.