Trace Claude Code to Braintrust
Wires Claude Code hooks so sessions, turns, and every tool call are logged as hierarchical Braintrust traces.
AutomationIntermediate★ 3,945⑂ 303AI score 7/10Last updated: Jan 26, 2026
What it does
- Sets up four hooks (SessionStart, PostToolUse, Stop, SessionEnd) that stream Claude Code activity to Braintrust.
- Produces hierarchical traces: session root → conversation turns → individual tool calls, so you can see which files were read and which commands ran.
- Ships a ready-to-paste
.claude/settings.local.jsonplus a table of env vars (TRACE_TO_BRAINTRUST,BRAINTRUST_API_KEY,BRAINTRUST_CC_PROJECT, debug flag). - Includes troubleshooting for missing traces, permission errors, missing
jq, and stale state files.
Who it's for
- AI engineering teams already using or evaluating Braintrust for observability.
- Developers who need an audit trail of what the agent actually did during a session.
- Anyone collecting session data to improve prompts and agent workflows.
Examples
- Run
setup.shinside a project, enter your API key and project name — hooks register automatically and every later session shows up under Braintrust Logs. - If nothing appears, follow
tail -f ~/.claude/state/braintrust_hook.logand flipBRAINTRUST_CC_DEBUG="true"for verbose output. - Prefer code over hooks? Use the included
wrapClaudeAgentSDKsnippet for the Claude Agent SDK integration.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/parcadei/Continuous-Claude-v3/HEAD/.claude/plugins/braintrust-tracing/skills/trace-claude-code/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/plugins/braintrust-tracing/skills/trace-claude-code folder from the GitHub repo parcadei/Continuous-Claude-v3 into my ~/.claude/skills/trace-claude-code/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/parcadei/Continuous-Claude-v3.git && mkdir -p ~/.claude/skills && cp -r Continuous-Claude-v3/.claude/plugins/braintrust-tracing/skills/trace-claude-code ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Create a Braintrust account and generate an API key from the settings page.
- Install
jq(brew install jqon macOS,sudo apt-get install jqon Ubuntu/Debian). - Clone the repo:
git clone https://github.com/parcadei/Continuous-Claude-v3.git - Copy the skill:
mkdir -p ~/.claude/skills && cp -r Continuous-Claude-v3/.claude/plugins/braintrust-tracing/skills/trace-claude-code ~/.claude/skills/ - Make the hook scripts executable:
chmod +x ~/.claude/skills/trace-claude-code/hooks/*.sh - Change into the project you want traced and run
bash ~/.claude/skills/trace-claude-code/setup.sh, entering your API key and project name when prompted. - Review the generated
.claude/settings.local.jsonand add it to.gitignoresince it holds your API key. - Restart Claude Code, do a few actions, then open braintrust.dev → your project → Logs to confirm traces are arriving.
View source on GitHub ↗License: MIT