braintrust-tracing

Trace Claude Code sessions in Braintrust to debug and analyze agent interactions.

3.9k|296|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill braintrust-tracing-parcadei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: braintrust-tracing
Source: https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/braintrust-tracing
Command: npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill braintrust-tracing-parcadei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to integrating Claude Code sessions with Braintrust for detailed tracing, enabling effective debugging and analysis of agent interactions.

Core Features & Use Cases

  • End-to-end Tracing: Understand the flow of execution from session start to end, including tool usage and LLM calls.
  • Sub-agent Correlation: Learn strategies to link traces of parent sessions with their spawned sub-agents, even when they create orphaned traces.
  • Debugging Tools: Utilize provided commands and logs to troubleshoot tracing issues and verify Braintrust integration.
  • Use Case: When a complex multi-agent workflow fails, use Braintrust tracing to pinpoint the exact step and sub-agent responsible for the error by correlating parent and child session traces.

Quick Start

To enable Braintrust tracing, ensure TRACE_TO_BRAINTRUST is set to true in your .claude/settings.local.json and your BRAINTRUST_API_KEY is configured.

Frequently Asked Questions about braintrust-tracing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace Claude Code sessions in Braintrust for debugging?

Trace Claude Code sessions in Braintrust by setting TRACE_TO_BRAINTRUST to true in your .claude/settings.local.json and configuring your BRAINTRUST_API_KEY. This enables detailed end-to-end execution flow tracking for debugging.

How does sub-agent correlation work when tracing multi-agent workflows?

Sub-agent correlation links parent session traces with spawned sub-agents in Braintrust. It uses specific strategies to connect orphaned traces, helping pinpoint exact steps and sub-agents responsible for multi-agent workflow errors.

What hook events are captured in the Braintrust trace hierarchy?

The Braintrust trace hierarchy captures hook event flows from session start to end, including tool usage and LLM calls. This structure provides a comprehensive view of execution paths within your Claude Code sessions.

Why is my Braintrust integration not logging traces from Claude Code?

If your Braintrust integration is not logging traces, use the provided debugging commands and logs to troubleshoot. Common issues include incorrect environment variables or missing API keys in your local settings configuration.

Can I debug complex agent interactions without losing trace context?

Yes, you can debug complex agent interactions by correlating parent and child session traces in Braintrust. This maintains context across spawned sub-agents, even when they generate orphaned traces during execution.