How can we help?

Quick start: pilot Claude Code and Cowork token tracking

Uri Nativ
Uri Nativ
  • Updated
Torii AI

This guide walks an admin through running a small pilot of Claude Code token tracking - typically a cohort of ~10 employees on a one-liner manual install - before a company-wide rollout. It also covers Claude Cowork, which you turn on once for your whole Claude organization. About 10 minutes start to finish.

Why pilot first? A manual install on a handful of employees confirms telemetry flows end-to-end and shows up in your dashboard before you push the same config to every machine via MDM.

1. Open your install page

Go to https://app.toriihq.com/team/ai/telemetry/claude-code. The URL auto-redirects to your org.

You'll land on the Telemetry index - click into Claude Code:

Set up AI telemetry page in Torii - Claude Code, Codex CLI, Gemini CLI, and GitHub Copilot tiles

2. Copy the install one-liner

Under Manual setup, copy the install command - your token is already filled in (the endpoint is baked into the script itself). Three OS variants are shown; copy whichever ones your team uses:

  • macOS: curl … install-claude-code-telemetry-macos.sh | bash -s -- …
  • Linux: same but -linux.sh
  • Windows (PowerShell): iwr … -OutFile … ; & … -Token '…'

Claude Code install page with Active status badge and the Manual setup one-liner

3. Forward to your pilot employees

Paste it into a Slack message with this template:

Hey team - you're part of a small pilot for Claude Code telemetry. Please paste the line below into your terminal (PowerShell on Windows). No sudo, no restart, ~30 seconds. Then close any open Claude Code session and start a new one to pick up the new config.

<paste the one-liner here>

4. Confirm data is flowing

Back on the install page, click View recent events (top-right of the status card). You'll see a live per-employee table of events with timestamps, models, and OK status - the most direct signal that everything's wired up correctly.

Recent events modal showing per-employee events flowing in

The page-level status badge also flips to Active - last event … within a few minutes of the first event.

5. Track Claude Cowork activity

Claude Cowork can run on the employee's computer or in the cloud. A cloud session runs on Anthropic's infrastructure, even when the employee starts it from the Claude desktop app.

The install from steps 2 and 3 covers Cowork sessions that run on the computer. Cloud sessions never read the computer's settings, so they need a setting in your Claude organization.

You need an admin of your Claude organization, on a Claude Team or Enterprise plan. Employees need the Claude desktop app version 1.22209.3 or later.

  1. On your Claude Code install page in Torii, copy the Endpoint and the Token.
  2. In Claude, open Cowork monitoring in your organization settings.
  3. Under Cowork, Cowork in the cloud, and unified chat and Cowork, fill in:
    • OTLP endpoint: the endpoint you copied
    • OTLP protocol: HTTP/JSON
    • OTLP headers: Authorization=Bearer <your token>, using the token you copied
    • Resource attributes: leave empty
  4. Save.

Cowork sessions that start after you save report to Torii. Sessions that were already open don't pick up the change.

Cowork activity appears under View recent events on your Claude Code install page, and in the AI Module dashboards as Anthropic usage, together with Claude Code.

Keep the Claude Code install in place. A Cowork session that runs on the computer is counted once, not twice.

Rolling back

If anything looks off on a specific employee's machine, two clean options:

Preferred - run the uninstall one-liner. On the same install page, switch the operation from Install to Uninstall and copy the command. Pasting it in terminal strips only the telemetry env keys we added; nothing else in the employee's settings file is touched. Works on macOS, Linux, and Windows.

Manual restore from the install-time backup. Each install that changes an existing settings file drops a timestamped backup next to it:

  • macOS / Linux: ~/.claude/settings.json.ai-otel-backup-<timestamp>
  • Windows: same name under %USERPROFILE%\.claude\

Renaming that file over settings.json reverts to the exact pre-install state.

To stop Cowork reporting, clear the fields under Cowork monitoring in your Claude organization settings and save. Nothing on employee machines needs to change.

Most common gotcha

“I ran the command but no data shows up” → telemetry only emits from a new Claude Code session started after the install. Fully close any open Claude Code window/tab and open a fresh one before checking.

The same applies to Cowork: settings load when a session starts, so start a new Cowork task after saving.

What’s next

Once the pilot is healthy and data is flowing, plan the company-wide rollout via your MDM. The Torii install page has an MDM rollout mode (toggle “Deployment method”) with ready-made scripts for Jamf, Kandji, Intune, JumpCloud, Mosyle, Workspace ONE, and SCCM.

Related articles

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request