Applies to:
- Plan -
- Deployment -
This article applies to
trace-claude-code versions before v2.0.1, including v2.0.0. For v2.0.1 and later, see Claude Code troubleshooting. If you’re upgrading from an older plugin, see Migrate from an older plugin version.Summary
Issue: Claude Code tracing appears to succeed but logs never appear in Braintrust, and~/.claude/state/braintrust_hook.log is never created.
Cause: The trace-claude-code plugin is not installed or not registered. The braintrust plugin, which lets Claude Code query Braintrust data, is separate and does not register tracing hooks.
Resolution: Install the trace-claude-code plugin and verify hooks are registered before testing tracing.
Resolution steps
Step 1: Distinguish the two plugins
Two separate plugins exist:braintrust: lets you query Braintrust from within Claude Code.trace-claude-code: registers the hooks that send Claude Code sessions to Braintrust Logs.
trace-claude-code is not loaded.
Step 2: Check which plugins are installed
Exit any running Claude Code session and run from your terminal:trace-claude-code is not listed, install it:
Installing from an updated marketplace may install
trace-claude-code v2.0.1 or later. In that case, follow the current Claude Code setup guide instead of the environment-variable steps below.Step 3: Verify hooks are registered
Fully restart Claude Code, then run/hooks inside a session.
Confirm trace-claude-code appears with source: Plugin and includes the core tracing hooks, such as:
SessionStartUserPromptSubmitPostToolUseStopSessionEnd
trace-claude-code hooks are missing, the plugin is not loaded and tracing will not work regardless of environment variables.
Step 4: Confirm environment variables are set
Step 5: Enable debug mode and test
Start a fresh session with debug enabled:braintrust_hook.log still does not exist after this step, the hooks are not executing. Review the debug file for errors about skipped or failed hook commands.