See What Your AI Coding Agent Is Actually Doing with Claude Tap
You've probably had that moment where an AI coding agent does something unexpected, and you have no idea why. Maybe it called a tool you didn't expect, or it suddenly lost track of context. You're left guessing what happened inside the black box. Claude Tap is a local proxy and trace viewer that lets you inspect exactly what your agent is sending and receiving — every system prompt, tool call, and streaming response, all captured on your machine.
What It Does
Claude Tap sits between your CLI-based AI coding agent and its API endpoint, recording all the traffic that passes through. It works with a wide range of agents including Claude Code, Codex CLI, Gemini CLI, Kimi CLI, OpenCode, Pi, Hermes Agent, Cursor CLI, Qoder CLI, Antigravity CLI, and CodeBuddy CLI. You run your CLI through Claude Tap, and it captures the full conversation history, tool schemas, tool calls, tool results, reconstructed streaming responses, token usage, and request diffs.
The tool writes each run as a local trace session. You can then open that session in its built-in viewer, which supports both light and dark modes. The viewer shows you the exact context your agent is working with, and it includes a structured diff feature that compares adjacent requests side by side. If you need to share a trace with someone else, you can export the session to a self-contained HTML file that works without any server.
Why It's Cool
The value here is straightforward: debugging AI agents is notoriously hard, and Claude Tap makes it visible.
-
You see the exact context. Not just what the agent said, but the full system prompt, the message history, every tool definition, every tool result, and the reconstructed streaming response. When your agent goes off the rails, you can see exactly what it was working with.
-
The diff feature is genuinely useful. AI agents build context across multiple turns, and subtle changes in that context can cause big behavioral shifts. The structured diff across adjacent requests lets you pinpoint exactly which prompt, message, tool, or parameter changed between calls. That's the kind of evidence that turns guesswork into debugging.
-
Everything stays on your machine. There's no hosted dashboard, no data sent to a third party. Common auth headers are redacted automatically before recording. If you're working with sensitive codebases or proprietary prompts, that's a meaningful advantage.
-
It works across many clients with one workflow. You don't need a different tracing tool for Claude Code versus Codex CLI versus Gemini CLI. Claude Tap handles all of them, which is convenient if you switch between agents or work on a team that uses different tools.
-
The portable artifact is a nice touch. Being able to export a trace to a single HTML file means you can share a session with a colleague, attach it to a bug report, or archive it for later review without anyone needing to install anything.
How to Try It
Install Claude Tap from PyPI, then run your CLI through it. The basic flow looks like this:
pip install claude-tap
After installation, you'll use Claude Tap to proxy your agent's traffic. The exact command depends on which client you're using, but the general pattern is that you point your agent at Claude Tap's local proxy instead of the standard API endpoint. The README covers the specific setup for each supported client.
Once you've run a session, you can open the trace viewer to inspect everything that happened:
claude-tap view <path-to-trace-session>
You can also export a trace to a standalone HTML file for sharing or archiving. The repository has more detailed instructions for each supported client, including how to configure Claude Code, Codex CLI, and the others.
Check out the full documentation and source code at github.com/liaohch3/claude-tap.
Final Thoughts
Claude Tap solves a real pain point for anyone who uses CLI-based AI coding agents regularly. If you've ever found yourself wondering why an agent made a particular decision or why it suddenly lost track of a conversation, this tool gives you the evidence you need. It's not flashy — it's a proxy and a viewer — but that's exactly what makes it useful. It does one thing and does it well. For developers who treat their AI agent as a serious tool rather than a toy, Claude Tap is worth keeping in your toolbox.
Follow @githubprojects for more developer tools and open source projects.
Repository: https://github.com/liaohch3/claude-tap