braintrustdata/braintrust-claude-plugin
braintrustdata/braintrust-claude-plugin · 21 stars · 1 plugin
Marketplace Trace Claude Code sessions in Braintrust via the Braintrust Claude Plugin
Install
/plugin marketplace add braintrustdata/braintrust-claude-pluginRun inside Claude Code, then install plugins from it. Check the repo's README before you run it.
Plugins 1
After adding the marketplace, install one with /plugin install <name>@braintrust-claude-plugin.
- 1trace-claude-codeAutomatically trace Claude Code conversations to Braintrust. Captures user messages, assistant responses, and tool calls for observability.
/plugin install trace-claude-code@braintrust-claude-plugin
Files
Braintrust tracing for Claude Code
This repository is generated. It is built from braintrustdata/braintrust-coding-agent-plugins. Don't edit files here — make changes and file issues in that repository, and they will be rebuilt into this one.
A Claude Code plugin marketplace for tracing Claude Code sessions to Braintrust.
Prerequisites
- A Braintrust account
- Claude Code
- The Braintrust CLI
Supported Claude surfaces
This marketplace plugin supports Claude Code CLI and Claude Code mode in the
desktop app. It does not currently support the Cowork tab, which runs tools and
hooks inside a separate VM without the host's bt installation, Braintrust
configuration, or environment variables.
In Cowork, use the Braintrust connector provided through Claude for MCP access. Automatic Cowork session tracing is not currently supported.
Quickstart
Authenticate and install the published tracing plugin:
bt login bt trace enable claude --project my-coding-agent
Setup adds the marketplace and installs or enables trace-claude-code.
The plugin forwards lifecycle events locally; bt owns authentication,
trace construction, and delivery.
Use --profile or --org when needed. Setup stores only non-secret routing
settings under ~/.claude/braintrust.json. Restart Claude Code after setup.
Every registered lifecycle event is forwarded synchronously to
bt trace hook --source claude-code, preserving per-session ordering. Hook
failures never fail a Claude Code turn.
This marketplace does not install or configure the Braintrust MCP server. Use your agent's native connector or MCP configuration when you want MCP access.
Data handling
Tracing forwards Claude Code's native hook payloads and reads the session transcript to construct traces. This can include user prompts, tool inputs and outputs, model requests and responses, and session metadata. Each turn records the effective Claude permission mode. Root-span metadata includes, when Claude provides it, the complete client system prompt.
System prompts and the other captured content can contain confidential instructions, file contents, or secrets. The plugin does not redact these values locally. Configure the applicable Braintrust content-redaction controls before enabling tracing, and do not trace content that must not be sent to Braintrust. Redaction cannot remove data that has already been delivered.
Additional root metadata
For a persistent route, pass a JSON object to bt trace enable claude --additional-metadata '<JSON>' to tag the root span of every Claude Code
session. Standard session metadata takes precedence if keys conflict.
For one invocation without changing the persistent configuration, use
bt trace run --additional-metadata '{"ci":true,"run_id":"abc-123"}' claude,
or set BRAINTRUST_ADDITIONAL_METADATA before that command (bt trace run
still accepts it; a launched claude session's live hooks do not).
Root-span tags
Use repeatable --tag options to apply filterable tags to every root span in a
route. Tags can be persisted with setup, supplied to one invocation, or added
while importing a transcript:
bt trace enable claude --tag ci --tag release-validation bt trace run claude --tag ci -- "review this change" bt trace import claude session-id --tag historical-import
For automation, set BRAINTRUST_TAGS to a comma-separated list before
invoking setup, a run, or an import:
BRAINTRUST_TAGS=ci,release-validation bt trace run claude -- "review this change"
One-off runs and transcript import
bt trace run --project my-coding-agent claude -- -p "summarize this repository" bt trace import claude SESSION_ID bt trace import claude SESSION_ID --attach
run leaves your saved settings alone. import reads a saved transcript;
--attach follows it until Ctrl-C. Imports include only what the agent recorded.
Manage tracing
bt trace doctor claude bt trace status bt trace update claude bt trace disable claude
See the tracing plugin guide for the capture architecture and supported surfaces.
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "braintrust-claude-plugin",
"version": "2.0.0",
"description": "Braintrust session tracing for Claude Code",
"owner": {
"name": "Braintrust",
"email": "support@braintrust.dev"
},
"plugins": [
{
"name": "trace-claude-code",
"description": "Automatically trace Claude Code conversations to Braintrust. Captures user messages, assistant responses, and tool calls for observability.",
"source": "./plugins/trace-claude-code",
"category": "observability"
}
]
}Facts
- Kind
- Marketplace
- Repo
- braintrustdata/braintrust-claude-plugin
- Group
- Uncategorized
- Stars
- 21
- Marketplace name
- braintrust-claude-plugin
- Owner
- Braintrust
- License
- MIT
- Language
- Python
- Created
- 2025-12-20
- Last push
- 2026-11-10
- Forks
- 11
- Topics
- braintrust, claude, claude-code, tracing
- Plugins
- 1