← all repositories
liaohch3/claude-tap

Wiretap for your coding agent's API chatter

Because "the model just did something weird" is a terrible debugging strategy.

2.6k stars Python Coding AssistantsLLMOps · Eval
claude-tap
Velocity · 7d
+11
★ / day
Trend
cooling
star history

What it does

claude-tap sits between you and a dozen AI coding agents — Claude Code, Codex CLI, Gemini CLI, Cursor CLI, Kimi, OpenCode, and others — recording every API request and response in a local trace viewer. You see system prompts, tool schemas, streaming responses, token usage, and how context shifts between turns. No hosted dashboard; traces stay on your machine with auth headers redacted.

The interesting bit

The tool auto-detects each client’s authentication setup and upstream endpoint, then picks reverse or forward proxy mode accordingly. For AWS Bedrock it even decodes AWS EventStream binary responses to extract token counts. The diff viewer lets you compare adjacent requests to pinpoint exactly which prompt or parameter nudged the agent off course.

Key highlights

  • Supports 11+ clients including Claude Code, Codex CLI (OAuth and API key modes), Gemini CLI, Cursor CLI, Kimi, OpenCode, Pi, Hermes Agent, Qoder, and CodeBuddy
  • Exports self-contained HTML trace files for sharing or archiving
  • Live browser viewer runs locally by default; can be disabled with --tap-no-live
  • Handles tricky auth flows: Google OAuth, ChatGPT subscription OAuth, AWS SigV4, and various API-key schemes
  • Auto-detects custom upstreams (DeepSeek, Bedrock gateways, Moonshot) from environment variables

Caveats

  • Requires Python 3.11+
  • Some clients need explicit --tap-target or --tap-proxy-mode overrides when auto-detection fails
  • Forward proxy mode for AWS native Bedrock (*.amazonaws.com) cannot rewrite the target URL without breaking SigV4 signatures

Verdict

Worth it if you’re building prompts, debugging agent behavior, or just suspicious about what actually gets sent to the API. Skip if you trust your coding agent implicitly and enjoy surprises.

Frequently asked

What is liaohch3/claude-tap?
Because "the model just did something weird" is a terrible debugging strategy.
Is claude-tap open source?
Yes — liaohch3/claude-tap is open source, released under the MIT license.
What language is claude-tap written in?
liaohch3/claude-tap is primarily written in Python.
How popular is claude-tap?
liaohch3/claude-tap has 2.6k stars on GitHub and is currently cooling off.
Where can I find claude-tap?
liaohch3/claude-tap is on GitHub at https://github.com/liaohch3/claude-tap.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.