Project Info

Codex Anatomy - An explorable diagram of your Codex session

Devpost

Inspiration

I was curious what happens under the hood of a Codex session. I found existing repos that explore the session through raw logs, but the text was hard to follow. You cannot see the shape of what happened, only scroll through it. That pushed me to build a visual explorer, starting with the rollout file from my own Codex CLI session.

What it does

Codex Anatomy parses a Codex session's JSONL rollout file, breaks it into tasks, and further into individual turns. It then renders that structure as an explorable, illustrated diagram instead of a flat log

How we built it

Codex Anatomy is built as a monorepo: a Python/FastAPI backend that parses and normalizes Codex session data, and a React/Vite/Tailwind frontend that renders it as an explorable execution tree. Both are deployed separately. The backend is deployed on Google App Engine, the frontend on Vercel. I used real data throughout, not fabricated examples. The bundled sample sessions are actual Codex CLI transcripts captured while building this project, including the exact session where the retry-detection logic itself was written, containing genuine dependency install failures and their retries.

Challenges we ran into

The hardest technical problem turned out to be detecting failure at all. Codex's raw session data has no structured success/failure field for shell commands, no exit codes, nothing. I confirmed this three separate ways: inspecting real payloads directly, checking Codex's published docs, and comparing against an independent third-party trace dataset. So, to circumvent this drawback, I built three: a structured one for patch operations (which do carry a success/failure field), a text-heuristic one that scans command output for failure markers, and a structural one that catches retries by detecting near identical repeated commands. Codex also caught and fixed a real false positive in its own heuristic. A command that successfully read old session data got flagged as failed because its output happened to quote historical error text. One of the more interesting bugs Codex found on its own is that the same message was being silently duplicated in Codex's own session file, once as an event_msg, once as a response_item, therefore inflating the message counts by roughly 13% across every session. It caught this by comparing the exact byte content (via SHA hashes) of records that looked suspiciously similar, confirmed they were identical, and fixed the duplication. A separate, harder problem was a frontend rendering bug in the execution tree. The connector lines (SVG) and the node cards (HTML) were positioned using two coordinate systems that only looked aligned by coincidence. Adding a resizable panel exposed this, and after several rounds of diagnosis I made a call to revert that feature in the interest of time.

Accomplishments we're proud of

I'm proud of getting backtrack and retry detection working reliably against real, messy session data, using three different signals layered together rather than relying on a single, brittle one. I'm also proud that the sample sessions bundled with the app are drawn from my own real usage; these are actual transcripts from building this exact tool, including the session where the retry-detection logic itself was written

What we learned

Codex's own session format has gaps and quirks that you discover by looking at the session data closely: 1) Duplicate message recording across two internal event streams 2) Encrypted reasoning content you can never read back 3) Sparse token-usage events that don't map 1:1 to turns

What's next

Cross-session task comparison (right now Compare only works within one session, as matching tasks across two different sessions would need its own alignment logic) Full-text search across turn payloads Resizable panel layout, once the underlying coordinate-system bug is properly fixed

Analysis

Compare with all teams

No indexed repository for this project, so there are no commit stats to show.

Technology

Found in codeNot checked
  • OpenAIUnchecked
  • PythonUnchecked
  • ReactUnchecked
  • VercelUnchecked

No repository was indexed for this project, so these Devpost claims have not been checked against code.

AI coding agents

No repository was indexed, so agent usage could not be checked.

Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.

Codebase size

No repository was indexed, so there is no codebase to measure.

0 stars