Skip to main content
The CoreWeave Forge plugin for Claude Code automatically traces every Claude Code session and sends the structured data to Agent Lens. The plugin logs every turn, tool call, and subagent with no code changes required. Use these traces to debug sessions, audit tool usage, and monitor cost and latency across runs. This guide walks you through installing the plugin, viewing your Claude Code traces in Agent Lens, configuring the plugin, and managing its lifecycle.
This plugin sends Claude Code session data to Agent Lens. 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 Agent Lens under your security or compliance requirements, don’t install this plugin.

Prerequisites

  • Node.js v18.19 or later, or v20.6 or later (includes npm).
  • Claude Code installed and authenticated.
  • A CoreWeave Forge account and API key set as a WANDB_API_KEY environment variable.
  • An Agent Lens project ([YOUR-TEAM]/[YOUR-PROJECT]) to receive traces.

Install the plugin

Install the CLI, run the installer to register the plugin with Claude Code, then start a Claude Code session to begin tracing.
1

Install the CLI

This plugin is separate from the weave-claude-code plugin documented in the Weave guide. Its CLI is forge-agent-lens-for-claude-code, and its skills use the forge name. If you installed weave-claude-code or the earlier @coreweave/forge-claude-code package, uninstall it before you install this plugin, so the two don’t send duplicate traces:
Settings don’t carry over from either package. Set your project and API key again when the installer prompts for them. If you set the plugin’s environment variables, rename WEAVE_PROJECT to FORGE_TRACE_PROJECT and WEAVE_AGENT_NAME to FORGE_CLAUDE_CODE_AGENT_NAME.
2

Run the installer

The installer does the following:
  • Creates ~/.forge-agent-lens-for-claude-code/settings.json.
  • Registers the plugin in Claude Code.
  • Prompts for your Agent Lens project ([YOUR-TEAM]/[YOUR-PROJECT]) and Forge 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 FORGE_TRACE_PROJECT and WANDB_API_KEY from the environment and warns if either is missing. It doesn’t write these values to settings.json.By default, the installer registers the plugin from GitHub. If your CI system or container can’t reach GitHub, pass --source=local to register the plugin from the npm package you installed in the previous step:
3

Start Claude Code

If Claude Code is already running, run /reload-plugins in the session instead.The plugin traces sessions automatically from this point. It traces every Claude Code session on this machine, not only the sessions in one project.

View Claude Code traces in Agent Lens

After running at least one Claude Code session, open your project in the Agent Lens UI:
  1. Navigate to CoreWeave Forge, select Agent Lens from the product menu, and then select your project in the project selector at the top of the side menu.
  2. In the side menu, select Conversations.
  3. Select the Conversations tab to view all agent conversations saved for your project.
  4. Select a conversation to inspect the full conversation tree.
For more information about the Conversation tab, see View agent activity. Each user prompt produces one OTEL trace that follows the GenAI semantic conventions. The trace shows a full turn hierarchy:
The root invoke_agent claude-code span uses the top-level agent name, which defaults to claude-code. You can change it with the agent_name setting or the FORGE_CLAUDE_CODE_AGENT_NAME environment variable (see Configure the plugin). Subagents keep their own type names. Multi-turn conversations are linked server-side by conversation ID, so you can follow a 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 more information about traced data, see What Gets Traced in GitHub.

Configure the plugin

Use the forge-agent-lens-for-claude-code config commands to view or update plugin settings after installation:
By default, conversations appear under the agent name claude-code in the Conversations tab. Set agent_name to use a different name, for example to distinguish teams or projects. The name can’t be empty, and surrounding whitespace is trimmed. The plugin’s background daemon reads its settings when it starts. To apply a changed setting to a running daemon, restart it:
Environment variables take precedence over the settings file:

Agent Lens skills

After installation, three Agent Lens-specific skills are available directly inside any Claude Code session. You can use the forge:forge-config skill to set Agent Lens 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 conversations aren’t appearing in Agent Lens, run the following command to print the last 50 lines of the daemon log:
To print more lines, pass --tail with a line count:
To tail the log in real time:
The log file is also at ~/.forge-agent-lens-for-claude-code/logs/daemon.log. For more detailed daemon output while you diagnose an issue, turn on debug mode:
To turn on debug mode for the current shell session only, set FORGE_CLAUDE_CODE_DEBUG=1 instead.

Uninstall

To remove the plugin from Claude Code and stop tracing, run:
Pass --keep-logs to preserve the log directory.
Last modified on October 21, 2026