Telemetry export (no install)
This path installs nothing. Claude Code can export its own telemetry, and with the settings below it sends that telemetry straight to Opik. You deliver one block of settings, the same way you deliver any other Claude Code managed setting.
Choose it when you cannot install the plugin or the macOS app on your developers’ machines, or when you want the same rollout on macOS, Linux and Windows.
It covers Claude Code only, and it collects less than the other paths. Read what this path does not do before you choose it.
How it works
Claude Code sends an event to Opik when each model call starts and when it ends. The two events carry the request and the reply. Opik works out the cost breakdown from them on the server and stores the result in your AI Spend workspace.
On this path the request and reply of every model call are sent to Opik, so that the breakdown can be computed. With content capture off, which is the default, Opik keeps the counts and discards the text. On the plugin and the macOS app the breakdown is computed on the device, and no prompt or response text leaves it unless content capture is on.
Before you start
Check that you have:
- Access to your organization’s AI Spend workspace in Opik, to create the enrollment token.
- A way to deliver Claude Code managed settings: your MDM, or the Claude admin console.
- The work email of each user, if your developers do not sign in to Claude Code with a claude.ai account. See who the usage is reported under.
Set it up
Create an enrollment token
In Opik, open your AI Spend workspace and go to Enrollment tokens, then select Create token. Copy the token right away: it starts with opik_cipx_et_, and that dialog is the only time it is shown in full.
One token serves the whole fleet. Usage sent with it lands in the workspace the token was created in.
Prepare the settings
Start from this template. Replace the token, and replace the address if you self-host Opik:
Every line is needed. The settings in detail says what each one does.
The file holds the enrollment token and is readable by every user of the device, because Claude Code runs as the logged-in user and must be able to read it. The token can only send usage into your workspace. It cannot read anything back.
Deliver it
Deliver the file exactly as you would the plugin’s settings. The two ways are the same as for the plugin, and those pages have the commands:
- With your MDM, as a drop-in next to any managed settings you already push. Follow Plugin with MDM, and keep that page’s file name,
50-opik-cipx.json. On a device that already has the plugin’s settings, the new file then replaces them, so the device does not report through both. This lets you choose which devices get it, so you can start with one team. - In the Claude admin console, as managed settings. Follow Plugin with managed settings. This applies to every signed-in user in the organization at once.
Claude Code reads managed settings when it starts, so a session that is already running picks them up the next time it is opened.
Verify
Have one user run a prompt in a new Claude Code session. Then, in Opik, open Devices in your AI Spend workspace. Each user appears there once, with the time their usage last arrived.
A user who is missing from the list has not sent anything yet. Claude Code does not report a failed upload to its user, so this page is the check that matters.
Who the usage is reported under
Opik needs a work email for each user. It takes the first of these that it finds:
-
The
Cipx-User-Emailheader, when you set one. Add it to the headers line, with the address filled in for each device by your MDM: -
The email Claude Code reports by itself. Claude Code reports the address of the claude.ai account its user signed in with.
If neither is present, Opik refuses the upload. Claude Code reports no email when it is used with an API key, Amazon Bedrock or Google Vertex AI, so those devices need the header.
Set the header when you want usage reported under your directory’s address whatever account the developer signed in with. The admin console applies one file to every user, so it cannot set a different address for each of them; use your MDM for that.
Content capture
By default Opik keeps no prompt or response text from this path. To keep it, add Cipx-Capture-Content=true to the headers line:
The setting applies to the devices that receive that file, so you can turn it on for one group. Claude Code never includes thinking text in its telemetry, so that is not kept even with capture on.
Replacing the enrollment token
On this path Claude Code sends the enrollment token with every upload. That makes replacing it different from the macOS app:
- Create the new token.
- Deliver the settings again with the new token.
- Watch the old token’s device count on the Enrollment tokens page. It falls as users open Claude Code with the new settings. It does not reach zero while some users have not opened Claude Code since, and it also counts Macs that enrolled the macOS app with the same token.
- Retire the old token once the users you expect to be active have moved.
Retiring a token stops the usage of every user who still sends it, straight away. Macs running the macOS app are not affected, because they use the enrollment token only once.
To stop one user’s usage, revoke that user on the Devices page. Usage sent while a user is revoked is not kept.
What this path does not do
Run one path on a device, not two. A device that has the plugin or the macOS app as well as these settings reports every call twice.
The settings in detail
Remove
Remove the settings file, or the managed settings in the admin console. Claude Code stops sending telemetry the next time it starts. There is nothing else on the device to clean up.