A plugin-based harness that gives Claude Code, Codex and other coding agents shared agents, skills, hooks, memory and security scanning.
liaohch3/claude-tap
A local proxy and trace viewer that captures API traffic from AI coding agents like Claude Code and Codex CLI to inspect prompts, tool calls, and token usage.
- Stars
- 3,293
- Forks
- 284
- Open issues
- 40
- Last commit
- yesterday
What is it?
claude-tap runs an AI coding agent's CLI through a local proxy, or watches local transcripts for clients that cannot be proxied, and records the real API traffic. Each trace shows system prompts, conversation history, tool schemas, tool calls, streamed responses, token usage, and differences between adjacent requests.
It supports a broad set of clients, including Claude Code, Codex CLI, Gemini CLI, Kimi CLI, OpenCode, Pi, Hermes Agent, and Cursor CLI, with reverse or forward proxy modes depending on the client. Common auth headers are redacted before recording, and traces are stored locally with no hosted dashboard required.
The viewer is a self-contained HTML file that can be exported and shared for review or archiving. It includes structural diffs, search, token breakdowns, a live browser view during a run, and an iframe embed mode.
Key features
- 01Captures streaming API requests and responses from supported coding agent CLIs.
- 02Shows system prompts, tool definitions, tool calls, and token usage per request.
- 03Diffs adjacent requests to highlight changed messages, prompts, or parameters.
- 04Exports each session as a self-contained HTML viewer or compact trace bundle.
- 05Redacts common auth headers and keeps all trace data on the local machine.
Use cases
- Investigating why a coding agent changed its behavior between turns.
- Auditing which tools and system prompts an agent sends to the model.
- Comparing token usage and context growth across agent sessions.
- Archiving or sharing a reproducible trace of an agent run for review.
Quick start
- 1
Install claude-tap with uv (recommended)
uv tool install claude-tap - 2
Run Claude Code through claude-tap
claude-tap - 3
Or trace Codex CLI instead
claude-tap --tap-client codex
Things to know
- Requires Python 3.11+ and the agent client you want to trace, installed separately.
- Some clients, such as AWS native Bedrock, need extra setup like forward proxy mode.
Topics
FAQ
- What is claude-tap?
- A local proxy and trace viewer that captures API traffic from AI coding agents like Claude Code and Codex CLI to inspect prompts, tool calls, and token usage. claude-tap runs an AI coding agent's CLI through a local proxy, or watches local transcripts for clients that cannot be proxied, and records the real API traffic. Each trace shows system prompts, conversation history, tool schemas, tool calls, streamed responses, token usage, and differences between adjacent requests.
- Is claude-tap free to use? What license does it have?
- claude-tap is open source under the MIT license. Check the license terms before using it in commercial products.
- Is claude-tap still maintained?
- Actively maintained. The last commit to claude-tap was on Oct 19, 2026.
- What can I use claude-tap for?
- Investigating why a coding agent changed its behavior between turns. Auditing which tools and system prompts an agent sends to the model. Comparing token usage and context growth across agent sessions. Archiving or sharing a reproducible trace of an agent run for review.
- How do I install claude-tap?
- Install claude-tap with uv (recommended): uv tool install claude-tap Run Claude Code through claude-tap: claude-tap Or trace Codex CLI instead: claude-tap --tap-client codex
- Where can I get claude-tap?
- The source code and installation instructions are on GitHub: https://github.com/liaohch3/claude-tap
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A plugin of 36 AI coding-agent skills that runs a loop of brainstorm, plan, build, review, and capture learnings for reuse.
A btop-style terminal monitor that shows live token usage, context window, rate limits and open ports for Claude Code, Codex CLI and OpenCode sessions.
A modular runtime and orchestration system that coordinates AI coding agents through gated pipelines for tasks, review, shipping and docs across Claude Code, Codex, Cursor and more.
A prompt-based skill that makes AI coding agents write only the code a task needs, favoring reuse and minimal solutions over large implementations.
A large collection of role-specific AI agent prompt files (engineering, design, marketing, sales, security and more) that install into tools like Claude Code, Cursor and Gemini CLI.