Claude Code Setup
Launch Claude Code through tapes to capture every conversation automatically — no code changes.
Quick Start
The simplest way to capture Claude Code conversations:
tapes start claude This automatically:
- Starts the tapes daemon with auto-selected ports
- Points Claude Code at the proxy via
ANTHROPIC_BASE_URL - Tags all conversations with
agent_name: claude - Shuts down cleanly when you exit Claude Code
Conversations are stored in the Postgres database you configure — see Manual Setup below, or tapes local up to bootstrap one.
Manual Setup
For control over ports and storage, run the proxy yourself and point Claude Code at it.
1. Start tapes
tapes serve \
--provider anthropic \
--upstream "https://api.anthropic.com" \
--proxy-listen "0.0.0.0:8080" \
--postgres "postgres://tapes:tapes@localhost:5432/tapes?sslmode=disable" The --provider anthropic flag is required; the default provider is ollama.
2. Point Claude Code at the proxy
Add to your shell config (~/.zshrc or ~/.bashrc), then reload:
export ANTHROPIC_BASE_URL="http://localhost:8080" A /v1 mismatch between --upstream and ANTHROPIC_BASE_URL causes 404s — both must use it or neither.
| Upstream | Base URL |
|---|---|
https://api.anthropic.com | http://localhost:8080 |
https://api.anthropic.com/v1 | http://localhost:8080/v1 |
3. Run Claude Code
claude To stop capturing, remove the ANTHROPIC_BASE_URL line and reload your shell.
Verify It's Working
After sending a message, confirm the session was captured:
tapes sessions Your new session appears in the list, tagged agent_name: claude.
Troubleshooting
Conversations aren't captured
Confirm the base URL is set in the shell running Claude Code:
echo $ANTHROPIC_BASE_URL # should print http://localhost:8080 404 errors
Your base URL and upstream disagree on the /v1 suffix. Match them (see the table above) so the proxy forwards to the right path.
Next Steps
Everything you capture is queryable the same way, whatever agent produced it:
- Search your sessions — find past work by meaning
- Export a session — the API's session→traces→spans projection as JSONL
- Browse history in the Deck TUI — an ROI dashboard over sessions, traces, and spans
- Explore the API — the full read surface