Not sure which Claude Code connection to use? The Claude Code page covers managed-settings telemetry and the Admin API key. This page covers the per-machine Plugin, which captures the most granular per-developer signals and requires no admin plan. Weave Router is a separate product that changes which model serves each request — installing one does not install the other.
What’s tracked
The plugin hooks into the Claude Code session lifecycle and reports:- Session activity — session start/end, duration, model, OS, and git branch/remote
- Prompts — prompt submissions and (optionally) prompt text for activity classification
- Tool usage — tool name, type, inputs, and results, plus tool failures
- Subagents — subagent start/stop, subagent type, and each subagent’s final reply
- Agent output — agent responses and reasoning/thoughts
- Skills — which Claude Code skills are invoked
- Install health — a per-machine install ping so you can confirm each developer is reporting
Which sessions are captured
The plugin captures every Claude Code session that runs as the operating-system user it was installed for, because each one fires the same hooks:claudein any terminal, including the integrated terminal in VS Code or JetBrains- The Claude Code extension in VS Code and other IDEs
- Claude Code in the Claude Desktop app
~/.claude folder. A VS Code window opened in WSL runs Claude Code as the Linux user inside the distribution, which has its own ~/.claude, so it needs its own install there. See Windows and WSL.
What it unlocks
- No plan requirement — works on any Claude Code account, including third-party and self-managed setups where the Admin API and managed settings aren’t available
- Per-developer, per-session granularity — attribute activity to individual machines and developers rather than org-level aggregates
- Install health monitoring — see which machines have the plugin installed and reporting
- Richer behavioral signals — tool calls, subagent activity, and agent reasoning that the API-based methods don’t expose
- AI skills — per-session conversation scoring (planning, verification, ownership, and more) uses the plugin’s session-level signals or, on Claude Enterprise, Compliance API session transcripts
- Easy rollout — a generated install command for each environment where Claude Code runs, with auto-update built in
Prerequisites
- Claude Code initialized for the current user, either from the CLI or the Claude Code Desktop integration (the installer looks for
~/.claude) - Node.js 18 or later in each environment where Claude Code runs. The Windows-to-WSL installer supplies it when missing on Ubuntu 24.04; install it yourself in other WSL distributions.
- A Weave plugin telemetry API key (created in the steps below)
Additional requirements for Windows and WSL
The Windows-to-WSL installer is a Windows PowerShell wrapper around the existing Linux installer. Prepare both the Windows host and every Linux account where Claude Code runs:
No distribution name is hard-coded: by default, the installer inspects all registered WSL distributions and installs for each default Linux user with an initialized Claude profile. Distributions without a Claude profile or that cannot be probed automatically (for example, utility distributions without Bash) are skipped. Use
-Distribution and -LinuxUser with a saved script when Claude runs in only selected distributions or under a non-default Linux account; a failure to inspect an explicitly selected distribution fails the install. The real-WSL CI test uses Ubuntu 24.04 on WSL2; other distributions are not covered by that integration test and must provide all required tools themselves. Automatic dependency installation checks the Linux OS version, not the registered distribution name.
Correct user attribution is required before installation. The WSL installer requires Git in the selected Linux account and reads git config --global --get user.email there before changing dependencies or plugin files. When that global email is unset, it asks Git for Windows for the signed-in Windows user’s global email and uses that address. A Linux global email wins when both are set. A repository-local email, an explicit --user-email, JumpCloud, and Intune are not used. Missing Linux Git, or no usable email from either Git, fails that distribution and makes the overall run exit nonzero. It never installs Git or changes its configuration. The installer checks that an email is present and has a valid format; it cannot establish that the address belongs to the correct Weave account. Verify that mapping before deployment. The resolved email is written to the plugin configuration, including when reusing an existing configuration.
In a shell running as the Linux user that Claude Code will use, verify the prerequisites and email before deployment:
apt-get to install only missing dependencies (coreutils for base64, curl, ca-certificates, and nodejs). A compatible Node installation is reused, including one managed by nvm, mise, asdf, Volta, or fnm. Package operations run as Linux root through WSL without a sudo password prompt; plugin configuration and hooks are installed as the selected developer. A package installation failure stops that distribution’s install. Package repositories must be configured and accessible, and package installation must be permitted by your device policy. Uninstall leaves these system packages in place.
On other distributions, install these dependencies yourself and verify them as the selected Linux user before deployment:
Setup
1
Create a plugin API key in Weave
Go to Data → Claude Code → Connect, answer How do you pay for Claude Code?, and click Set up plugin on the Plugin card. If you can’t open that page, open Personal plugin setup on the Data page and choose Claude Code. Any signed-in member can click Create my install command. That command writes telemetry onto their own Weave account. Revoke my install command removes those personal commands. An admin can also click Create API key for a shared key that attributes by email. Weave shows the full key once.
2
Run the install command on each machine
Copy the command from the configuration modal and run it on each developer’s machine.macOS / Linux:Windows (PowerShell):Windows (Claude Code inside WSL): choose Windows (WSL) in the configuration modal. That command is a separate Windows-side installer; it visits each registered WSL distribution, checks the default Linux user’s The WSL installer starts stopped distributions when it visits them. It installs for each distribution’s default Linux user; Windows and Linux usernames can differ. Use Remote collectors must use HTTPS. Redact prompt and tool content in the
collector, but preserve the
~/.claude, and invokes the Linux installer there. The Windows-native command above only configures Claude running on Windows, even when its project is under \\wsl.localhost.-Distribution and -LinuxUser with a saved script when you need to target one distribution or a non-default Linux account. VS Code Remote WSL and a WSL terminal share an install when both run Claude as the same Linux user. A distribution without ~/.claude is skipped. If no selected distribution has an initialized Claude profile, the script prints No eligible WSL install and sets $LASTEXITCODE to 1. A saved copy run with -File exits with that code.To route telemetry through your redacting OpenTelemetry Collector, choose
Through an OpenTelemetry Collector in the configuration modal. The
generated command sets --telemetry-mode collector and the collector URL
for you. The equivalent shell form is:weave.token resource attribute so Weave can
associate the records with the organization.The installer verifies your token, downloads weave-telemetry.js to ~/.weave/claude-code-plugin/, writes config to ~/.weave/claude-code-plugin.json, and merges Weave hooks into ~/.claude/settings.json. It then fires an install ping. Direct mode confirms that Weave accepted it; collector mode confirms only collector receipt, so check the collector’s Weave exporter for downstream delivery.3
Start a session
Hooks take effect on the next Claude Code session — no restart needed. Run a session and confirm activity appears in Weave.
Content settings
Five content categories control what the plugin sends. They are the same set the Cursor plugin and Codex plugin use. The install command Weave generates already includes your organization’s Telemetry content retention floor. Members can deny more categories, but can’t turn back on a category the organization denies.
Pass
false to deny a category, for example --tool-io false. --privacy-mode true denies all five at once. On Windows, set WEAVE_PRIVACY_MODE, WEAVE_PROMPT_BODIES, WEAVE_AGENT_MESSAGES, WEAVE_TOOL_IO, WEAVE_FILE_PATHS, or WEAVE_GIT_CONTEXT before running install.ps1.
The installer writes these choices to ~/.weave/claude-code-plugin.json. You can edit the file later; the hook reads it on every event:
"privacy_mode": true overrides content_policy and denies every category. Setting WEAVE_PRIVACY_MODE=true in the environment Claude Code runs in does the same.
Some reports need specific categories:
- Agent autonomy and other prompt-pattern metrics need
prompt_bodies. Weave classifies each prompt from its text, and leaves out sessions with no classified prompt. - AI skills conversation scoring needs
prompt_bodies. It also usesagent_messages: without reply text, Weave scores a session only from its tool calls, and turns where Claude only replied in text add no evidence. - Skill usage records typed
/skillcommands under any setting. From plugin version 43, it also records skills Claude invokes on its own whentool_iois denied or privacy mode is on. Earlier versions recorded those only when tool input was allowed. The plugin auto-updates, so installs pick this up without re-running the installer.
Fleet / MDM rollout
For large teams, pre-deploy~/.weave/claude-code-plugin.json (with the token and endpoint) via your MDM, then run the install command without arguments — it reuses the existing config. The installer is idempotent: re-running it updates the hook command and skips events that are already wired up.
On macOS and Linux, the installer must run as the developer’s own user, not as root. It installs into $HOME/.weave/ and merges hooks into $HOME/.claude/settings.json, so a root-context run either fails because $HOME is unset or installs into root’s home, where the developer’s Claude Code never reads it. MDM tools (Jamf, Kandji, Intune, Fleet, Addigy) run scripts as root in a minimal environment by default. If your MDM has a “run as current user” (user-context) option, use it. On macOS, you can otherwise wrap the install command so it runs in the console user’s session:
~/.weave/claude-code-plugin.json. If you don’t pre-deploy it, pass --token and --endpoint (plus any content flags such as --privacy-mode) to the install command instead; passing a token rewrites the config file, so don’t combine it with a pre-deployed one.
Node.js 18 or later must be installed for the target user, and that user must have run Claude Code at least once so ~/.claude exists.
Windows MDM rollout for WSL
The WSL installer must run as the signed-in Windows user in 64-bit PowerShell. Running as SYSTEM cannot reach that user’s registered distributions, Linux home, or Windows Git email. Select Windows (WSL) to download the generatedinstall-wsl.ps1, which already carries the API key and organization content policy. When a target Linux account has no global Git email, the install uses that signed-in user’s Windows Git email.
For JumpCloud, use its Windows - Run As Signed In User template. Save the generated script to a user-accessible location, then invoke it with -File so WSL eligibility and installation failures become the PowerShell process exit code:
Claude Code managed settings
Claude Code server-managed settings and managed settings files can deliver the OpenTelemetry configuration Weave reads, but they can’t install the plugin. The plugin’s hooks runweave-telemetry.js and read ~/.weave/claude-code-plugin.json, and both files must exist on each machine, so run the installer per machine as described above.
Two Claude Code hook policies stop the plugin’s hooks from running:
allowManagedHooksOnlyset in managed settings blocks user hooks, including the ones the installer writes to~/.claude/settings.json.disableAllHooks: trueturns hooks off. Set in managed settings, it disables every hook. Set in user or project settings, it follows normal settings precedence.
Uninstall
To remove the plugin from a machine, run the install command with--uninstall. It removes the merged Weave hooks from ~/.claude/settings.json (across every event Claude Code supports), deletes ~/.weave/claude-code-plugin/ and ~/.weave/claude-code-plugin.json, and takes effect for any session started afterwards. The command is idempotent — a second run completes with no files left to clean up.
macOS / Linux:
iwr ... | iex, so set the WEAVE_UNINSTALL environment variable instead — the script clears it after reading it, so it won’t affect a later install in the same session:
install.ps1:
-Uninstall command remains limited to the Windows profile. Use a downloaded copy of install-wsl.ps1:
--uninstall after downloading the script:
Uninstall does not revoke the plugin API key. Rotate or delete it under Data → Claude Code → Plugin if you want every reference to it gone. The next install with a fresh key is a separate step after rotation.
Metrics enabled
Once reporting, the plugin feeds:- AI output percentage — portion of output from Claude Code
- AI efficiency index — impact on productivity
- Conversation prompt quality — prompt-level signals from captured sessions
Cost tracking
The plugin doesn’t report token usage, so it adds no cost estimate of its own. Claude Code spend comes from telemetry or a cost API key. See cost tracking for the full order. The plugin does make cost per PR more accurate. It records which branch and files each prompt worked on, so Weave can attribute that prompt’s cost to the right PR instead of linking whole sessions to PRs. See spend per engineer vs. cost per PR. When the plugin and telemetry both report the same session or prompt, Weave keeps one copy, so running both doesn’t double count. See using them together.Sync frequency
Telemetry is sent in real time as each hook event fires during a session.Troubleshooting
Windows diagnostics
Windows diagnostics
Run these checks in the same PowerShell session as the install command:Required output:Required output: Required output:
- Node reports
v18or later Test-PathreportsTrueTcpTestSucceededreportsTrue
ok: True and plugin_kind: claude_code.If installation completed, test delivery end to end:WEAVE_INSTALL_PING:ok.macOS diagnostics
macOS diagnostics
Run these checks in the same terminal session as the install command:Required output:Required output: JSON containing Required output:
- Node reports
v18or later - The directory check prints
Claude profile exists - The endpoint returns JSON containing
versionandhash
"ok":true and "plugin_kind":"claude_code".If installation completed, test delivery end to end:WEAVE_INSTALL_PING:ok.No activity after install
No activity after install
A successful installer prints
Verified telemetry pipe and Installation complete. After that:- Check that
~/.claude/settings.jsoncontains hooks referencingweave-telemetry.js - Fully quit and reopen Claude Desktop or the CLI
- Start a new Claude Code session
Data privacy
The plugin sends session metadata, tool usage, agent output, and — unless privacy mode is on — prompt text. It does not read source files or repository contents beyond what Claude Code passes through the hook events.Related integrations
- Claude Code — managed-settings telemetry and Admin API key
- Cursor plugin — the equivalent per-machine plugin for Cursor
- Codex plugin — the equivalent per-machine plugin for Codex
- Copilot plugin — Copilot Chat OTEL export to Weave
- OTel collector — route telemetry through your own collector
