Skip to main content
Weave for Agents is in public preview. Features, APIs, and the Agents view UI may change before general availability.
The Weave Claude Code plugin automatically traces every Claude Code session and sends the structured data to W&B Weave. Every turn, tool call, and subagent is logged with no code changes required. Use these traces to debug sessions, audit tool usage, and monitor cost and latency across runs.
This plugin sends Claude Code session data to Weave. That data can include user prompts, Claude responses, tool inputs and outputs, file contents read by Claude Code tools, shell commands and output, and fetched URLs and page content.PII scrubbing and sensitive-data redaction aren’t implemented. If you can’t send this data to Weave under your security or compliance requirements, don’t install this plugin.

Prerequisites

  • Node.js v18 or later (includes npm).
  • Claude Code installed and authenticated.
  • A W&B account and API key set as a WANDB_API_KEY environment variable.
  • A Weave project ([YOUR-TEAM]/[YOUR-PROJECT]) to receive traces.

Install the plugin

1

Install the CLI:

2

Run the installer:

The installer does the following:
  • Creates ~/.weave-claude-code/settings.json.
  • Registers the plugin in Claude Code.
  • Prompts for your Weave project ([YOUR-TEAM]/[YOUR-PROJECT]) and W&B API key if they aren’t already set.
To skip prompts in CI, bootstrap scripts, or other automated systems, set environment variables before running:
In non-interactive mode, the installer still creates the config file and registers the plugin. It uses WEAVE_PROJECT and WANDB_API_KEY from the environment and warns if either is missing.
3

Start Claude Code:

Sessions are traced automatically from this point. Run a prompt or two, then open your Weave project to see the traces appear.

View Claude Code traces in Weave

After running at least one Claude Code session, open your project in the Weave UI:
  1. Navigate to https://wandb.ai and select your project.
  2. In the sidebar menu, select Agents to view all agent conversations saved for your project.
  3. Select a conversation to inspect the full session tree.
For more on the Agents view, see View agent activity. Each user prompt produces one OTEL trace that follows the GenAI semantic conventions. The trace shows a full turn hierarchy:
Multi-turn conversations are linked server-side by session ID, so you can follow a full conversation across multiple traces. Each span includes token usage, model name, tool inputs and outputs, timing, and the textual content of prompts and responses. For full details, see What Gets Traced in GitHub.

Configure the plugin

Environment variables take precedence over the settings file:

Weave skills

After installation, three Weave-specific skills are available directly inside any Claude Code session. You can use the weave:weave-config skill to set Weave values from within Claude Code:

Check plugin status

You can use these CLI commands to check plugin status or troubleshoot issues:
Each line shows (OK), (action needed), or - (not yet active but not an error). If sessions aren’t appearing in Weave, check the daemon log:
To tail the log in real time:
The log file is also at ~/.weave-claude-code/logs/daemon.log.

W&B Dedicated Cloud or self-hosted instances

If you use W&B Dedicated Cloud or a self-hosted instance, set WANDB_BASE_URL before launching Claude Code:
The plugin runs a background daemon that reads WANDB_BASE_URL at startup. If the daemon is already running when you set the variable, it won’t pick up the change. To restart the daemon:
  1. Shut down the daemon:
  2. Set WANDB_BASE_URL, or run wandb login --host https://[YOUR-INSTANCE].wandb.io to persist the setting across sessions.
  3. Launch Claude Code again. The daemon restarts automatically and picks up the correct URL.

Uninstall

Pass --keep-logs to preserve the log directory.