Inside Claude Code: Mapping Its LLM Conversations
A runtime reverse-engineering toolkit that intercepts Claude Code's API calls to catalog its system prompts, tool definitions, and multi-agent architecture.

What it does
This project treats Claude Code as a black box and records its runtime API traffic instead of wrestling with minified source. By monkey-patching the bundled Anthropic SDK inside Claude Code’s cli.js, it logs every request and response to a local file. A browser-based visualization tool then parses these logs, filtering out repetitive system prompts so researchers can inspect the actual conversation flow. The extracted prompts and tool definitions are cataloged in the repository for study.
The interesting bit
The author abandoned static analysis after realizing LLMs struggle to reason about uglified JavaScript at architectural scale. The runtime approach reveals Claude Code’s multi-agent design: sub-agents handle exploratory tasks like codebase searches, then return only their final results to the main context—an elegant way to isolate “dirty context” and prevent token bloat.
Key highlights
- Extracted system prompts covering core workflow, context compaction, topic detection, and conversation summarization
- Documents a
TodoWritetool that persists short-term memory to~/.claude/todos/as JSON, reloaded at conversation boundaries - Reveals a sub-agent pattern that spins off independent tasks to keep the main thread’s context window clean
- Uses Haiku 3.5 for lightweight checks (quota, topic detection) and Sonnet 4 for the heavy agent workflow
- Includes an interactive HTML log viewer that auto-identifies injected system prompts by frequency and position
Caveats
- Requires modifying Claude Code’s installed files, an approach Anthropic has previously discouraged (a similar sourcemap-based reverse-engineering repo was taken down)
- The analysis is explicitly a work in progress, with more task scenarios to be explored
Verdict
A valuable reference if you’re building agentic coding tools and want to see how a production system structures its LLM conversations. Not a drop-in clone—the author explicitly recommends writing your own implementation rather than copying the plumbing.
Frequently asked
- What is Yuyz0112/claude-code-reverse?
- A runtime reverse-engineering toolkit that intercepts Claude Code's API calls to catalog its system prompts, tool definitions, and multi-agent architecture.
- Is claude-code-reverse open source?
- Yes — Yuyz0112/claude-code-reverse is an open-source project tracked on heatdrop.
- What language is claude-code-reverse written in?
- Yuyz0112/claude-code-reverse is primarily written in JavaScript.
- How popular is claude-code-reverse?
- Yuyz0112/claude-code-reverse has 2.4k stars on GitHub.
- Where can I find claude-code-reverse?
- Yuyz0112/claude-code-reverse is on GitHub at https://github.com/Yuyz0112/claude-code-reverse.