weave-claude-plugin is a plugin for the Claude Code command-line interface (CLI) that automatically captures traces from your Claude Code sessions and sends them to W&B Weave. Every conversation turn, tool call, and subagent interaction is recorded without any changes to your code or workflow. This is useful for debugging agent behavior, auditing session history, and monitoring Claude Code usage across your team.
Prerequisites
Before installing the plugin, make sure you have the following:- Claude Code installed
- Node.js and
npminstalled - A W&B account with a valid API key. To get your API key, see API keys.
W&B Dedicated Cloud and Self-Managed instances
If your organization uses W&B Dedicated Cloud or W&B Self-Managed, you must set your deployment’s base URL before launching Claude Code by doing one of the following:- Set the
WANDB_BASE_URLenvironment variable to your deployment’s base URL:
- Run the
wandb logincommand with thehostflag to persist the base URL across sessions. This writes the host URL to$HOME/.config/wandb/settings, which the Weave client reads automatically without requiring the environment variable to be set.
WANDB_BASE_URL or the host flag after the plugin’s daemon is already running, restart the daemon for the change to take effect:
Install the plugin
Install the CLI globally, then run the installer once:~/.weave_claude_plugin/settings.json, registers the plugin with Claude Code, and prompts you for your Weave project name and W&B API key. If WEAVE_PROJECT and WANDB_API_KEY are already set in your environment before you run install, the installer uses them and you can skip entering those values at the prompts. When you are done, launch or restart Claude Code. The plugin starts a background daemon when the Claude Code CLI starts, and sends traces to Weave.
For CI, bootstrap scripts, or other automation where you must not be prompted, set the --non-interactive flag. Set your environment variables first so the installer can authenticate with W&B and configure your Weave project, then run the installer. The installer still configures the plugin and registers Claude Code the same way. It uses the environment variables when they are set and warns if either is missing:
<your-team-name/your-project-name> and <your-api-key> with your own values.
Data disclosure
The plugin sends Claude Code session data to Weave. That data can include sensitive content, such as:- User prompts and model responses
- Tool inputs and tool outputs
- File paths and file contents read by Claude Code tools
- Shell commands and shell output
- Fetched URLs and content from fetched pages
PII scrubbing and sensitive-data redaction are not implemented in the current plugin. If you cannot send this class of data to Weave under your security or compliance requirements, do not install or enable the plugin.
View traces in Weave
Once you have installed the plugin and have Claude Code running, open the Traces tab of your Weave project to view your traces. Each Claude Code session appears as a top-level trace containing individual turns and tool calls as child entries. Each trace includes token usage, model name, tool inputs and outputs, timing, and the textual content associated with prompts and responses.Check status and logs
Use these commands to confirm the plugin is running and to troubleshoot issues. Check status to verify that the daemon is active and Claude Code is registered. Check logs if traces are not appearing in Weave or ifstatus reports that action is needed.
From a terminal, run:
- OK: Everything required for tracing is set up and running.
- Action needed: Something is misconfigured or missing. Check the daemon logs as follows for more information.
- Not yet active: Not an error. The plugin has not recorded any activity yet. Start or continue a Claude Code session, wait a moment, then re-run the command.
~/.weave_claude_plugin/logs/daemon.log.
Skills in Claude Code
With the plugin installed, the following skills are available inside any Claude Code session as slash commands. To avoid conflicts with Claude Code’s built-in skills, the skills use theweave:weave-* names below.
/weave:weave-install
Walks through installation and configuration interactively. Use it on a fresh machine or when diagnosing a broken setup: Claude checks for the CLI, runs the installer, prompts for missing values, and verifies that everything works.
/weave:weave-status
Reports current plugin status and explains what to fix. It corresponds to running weave-claude-plugin status, with Claude interpreting the output for you.