You don't need a proxy to monitor your coding agents
If your teams run Claude Code, Codex and Copilot, you can see what every session did without changing how anyone works.
Rogerio Chaves · · Agents
If you're rolling out Claude Code, Codex and Copilot to more than one team, Claude Code monitoring soon turns into a question about all of them: who uses which agent, what each team spends, and what the agents actually did in your repos.
Claude Code, Codex, the Copilot command-line interface (CLI) and Gemini CLI all have OpenTelemetry (OTel) export built in, and it stays off until you switch it on. Once it's on, Claude Code sends every session with its tool calls, tokens and cost, and Codex sends each tool run with its name, how long it took and its result.
None of that needs a proxy or a gateway in front of the agents, and your developers keep their own plans and logins. So the work left is switching the export on for every agent on every laptop and getting it into one place. With LangWatch, the platform we build for monitoring and testing AI agents, that's one command per agent, and sessions from Claude Code, Codex, Copilot, Gemini CLI and OpenCode land in the same list.
What tools monitor what AI coding agents are doing in my organization?
Each vendor has a usage dashboard for its own agent. Anthropic has a Claude Code analytics dashboard on Teams and Enterprise, OpenAI has workspace analytics and an Analytics API for Codex, and GitHub has Copilot usage metrics, where the dashboard charts leave out Copilot CLI and only the API counts it. Gemini CLI comes with a Google Cloud Monitoring dashboard when you send its telemetry to Google Cloud.
Each of those dashboards covers one vendor's agent. To put every agent side by side, per team, with what each session did, you need one tool that reads all of their OTel exports. LangWatch reads the export of Claude Code, Codex, Copilot, Gemini CLI, OpenCode, Grok CLI and pi, and turns it into sessions, pull requests and spend per person and per team.
One command for Claude Code, Codex, Copilot CLI, Gemini CLI and OpenCode
Install the LangWatch CLI with npm install -g langwatch (Copilot CLI needs this global install, because its hook file calls langwatch directly), or run it through npx, and start each agent through it once:
| Agent | Command | What you see per session |
|---|---|---|
| Claude Code | npx langwatch claude | Each turn with its tool call tree and every subagent on its own branch, cost per turn, terminal replay |
| OpenAI Codex | npx langwatch codex | Each turn with the model, tokens and timing, each tool run with its name, duration and result, terminal replay |
| GitHub Copilot CLI | npx langwatch copilot | The tokens, model and timing of each call, and the repository and branch from a hook file |
| Gemini CLI | npx langwatch gemini | Each turn with the model, tokens and timing, and each tool call with its details |
| OpenCode | npx langwatch opencode | Each turn with every model call and tool call in order |
Each command will open LangWatch for you to sign in, then start your agent with all telemetry already set up. After that, claude or codex works as usual, and since all five commands report to the same place, a team that mixes agents reads one set of numbers.
The first run asks how the agent should run. On a subscription, the agent keeps your own plan and login, and LangWatch receives telemetry only. If you pick an API key instead, the calls go through the LangWatch AI Gateway, which adds budgets. Grok CLI and pi, two more coding agents for the terminal, work the same way (npx langwatch grok, npx langwatch pi), and Cursor has no wrapper command, so it reports through the gateway.
The per-agent pages cover the details, such as the notify program that adds the conversation text to Codex sessions, since Codex's own export carries none.
Roll it out to every laptop
If you already push config to laptops, your developers don't have to run anything by hand:
- Setup scripts.
langwatch instrument <tool>writes the same setup and exits, without starting the agent, so it fits the script you run on new machines. - Managed settings. For Claude Code, put the telemetry settings in its managed settings file and ship it with your device management tool. Its values take precedence, and a user can't override them. Codex and Copilot CLI have their own admin files for the export:
requirements.tomlfor Codex andmanaged-settings.jsonfor Copilot CLI. - Servers and CI. Run
langwatch instrument claude --key ik-lw-...with an ingest key. It needs no login and can create traces and nothing else.
See every session, and what the agent did in it
Open Sessions at /me/sessions, or in a project's sidebar. A session is one run of a coding agent, from starting it to closing it, and the list keeps one row per session for the last 90 days. The Agent column says which agent ran it, and every column sorts. In a team project, I'd sort by token cost first, because the expensive sessions show how a team really uses its agents.

When you open a session, its Usage tab shows where the tokens went call by call, the tools the agent ran in order, how the time split between thinking, running tools and waiting for you, and what came out of it in lines changed and edits you kept.

On Claude Code and Codex sessions, the Terminal tab replays the session the way it looked in the terminal: your prompts, the agent's replies, every tool run with its output, and file changes as diffs. A tool call the agent was denied stays in the replay, marked as denied.

Which repo and pull request each session worked on
Each session reports the repository and branch it runs in, at the start and again after every turn. Connect GitHub under Settings > Integrations, and LangWatch maps each branch to the pull requests whose head is that branch and reads their status live from GitHub. It works backwards too, so a pull request someone opened after the session ended still gets its sessions.
When an agent moves into another checkout, it declares it with langwatch ingest context. You don't have to teach it: the setup installs the instruction through the LangWatch plugin on Claude Code and an AGENTS.md block on Codex, and Copilot CLI reports its repository and branch through a hook file the setup writes. The attribution docs cover each agent.
The Pull requests page has one row per pull request, and its detail splits the cost by contributor and by model, with every session behind it one click away from its terminal replay. The cost covers the pull request's whole life, across every contributor.

For your own reports, GET /api/coding-agent/pull-request-usage returns the same rollup, filtered by project, user and agent, so you can compare what Claude Code and Codex spent on the same pull request.
See what each team spends without a gateway
By default each developer's sessions go to their personal project, and the organization still counts their spend. When the work belongs to a team, pin the agent to the team's project:
langwatch instrument codex --project your-team-project
This mints an ingest key for the device, scoped to the project, so any number of machines can report to one project. The pin is per device and per tool: a laptop's Codex can stay personal while its Claude Code reports to the team. The project then gets Sessions and Pull requests in its sidebar, and its costs land in the project's analytics (team projects).
For the whole org, the Teams page at /governance/teams lists every team's spend and requests over the last 30 days, and Governance > People ranks each person by spend. To count spend by cost center, assign people, teams and projects to departments.
Each agent reports cost a bit differently. On a Claude subscription it's Claude Code's own estimate, and on an API key through the gateway it's Anthropic's own response. Copilot reports tokens but no cost, so LangWatch works out the cost of those tokens from the model's list price. That figure is not your Copilot bill. If Claude Code is where the money goes, I wrote up what drives its bill and how to track it in an earlier post.
You can add the LangWatch AI Gateway when you want a budget that stops spend. For Claude Code on the API key path, a team budget makes requests fail at the limit, and on a subscription you get alerts at 80 and 100 percent instead, because those calls can't be stopped from outside.
What security teams ask first
Before the rollout goes wider, security will ask what the monitoring collects and who can read it:
- Where do the sessions go? Into a personal project that only the developer owns, a separate project rather than a filter on a shared table. They go to a team project only when someone pins the tool to it, or when a managed settings file sends every machine there.
- Can admins read prompts? Only through one audited path. Day to day, admins see spend as numbers: cost per person, per team and per department, with no conversation content in it. To open someone's session, an admin goes through that one path, with a "Viewing as admin" banner for the whole visit, and every read writes an audit log row the developer can read under Settings > Audit log.
- Can we keep the conversation text out completely? Yes. Set input, output and system instructions to Drop in the data privacy policy, and LangWatch strips them at ingestion, before storage, on every path. You still get the model, tokens, cost, latency and timing of every session. Restrict keeps the text for a chosen audience and shows everyone else a
[REDACTED]placeholder. - What about keys pasted into prompts or printed by tools? Secrets redaction is on by default and runs before storage. It replaces each credential it recognizes with
[SECRET]: AWS, GitHub, OpenAI, Anthropic, Slack, Google and Stripe keys, JSON Web Tokens (JWTs), private key blocks, database connection-string passwords and bearer tokens. You can add your own patterns under Settings > Data privacy. - What key sits on each laptop? An ingest key (
ik-lw-...) can create traces and make no other request, so a leaked one can't read your data. Every CLI sign-in shows up under Devices, where you revoke one machine or all of them. - Can it all stay in our network? Yes. Run your own LangWatch (
npx @langwatch/serverto try it) and pass--endpointwith an ingest key, so the telemetry goes to your own instance.

You can also cut the text at the source. Remove the content flags from ~/.claude/settings.json and Claude Code keeps sending tokens, cost, model, latency and the tool call tree without the text. On Codex, remove the notify setting and keep the [otel] block, and the tokens, cost, model, timing and tool counts keep coming.
Put this into production with LangWatch.
Trace your agents, run evaluations, and turn failures into repeatable tests.
Frequently asked questions
- What is the best way to monitor Claude Code across a team?
- Turn on the OpenTelemetry export built into Claude Code on every machine and send it to one place. With LangWatch, each engineer runs npx langwatch claude once, or an admin pushes the same settings to every laptop with Claude Code's managed settings file. You then get every session with its tool calls, the pull request it worked on, and the spend per person and per team.
- Does Codex CLI support OpenTelemetry?
- Yes. Codex has an [otel] section in ~/.codex/config.toml with separate exporters for log events, metrics and traces, and it keeps prompt text out unless you turn log_user_prompt on. Admins can enforce the exporters in requirements.toml. npx langwatch codex writes the setup for you and sends it to LangWatch.
- Do I need an AI gateway to monitor coding agents?
- No. Claude Code, Codex, Copilot CLI and Gemini CLI report their sessions over OpenTelemetry, so LangWatch reads that telemetry while each developer keeps their own plan and login. A gateway is an extra for when you want budgets that stop requests at the limit and model policies. Cursor has no wrapper command, so LangWatch reads Cursor through the LangWatch AI Gateway.
- How do enterprises govern AI coding assistants like Claude Code and Cursor?
- With each vendor's admin settings plus one place that sees all of them. Claude Code has a managed settings file, Codex has requirements.toml, Copilot CLI has a managed-settings.json telemetry key, and Cursor admins set up export in Team Settings on the Enterprise plan. LangWatch then shows every agent's sessions, pull request cost and spend per team in one view, with audited admin access and content you can drop before storage.
- Which observability tools work for AI coding agents across several teams?
- Look for one that reads the agents' own OpenTelemetry export, so you don't have to change how people work, and that splits the data by person, team and pull request. LangWatch does this for Claude Code, Codex, GitHub Copilot, Gemini CLI, OpenCode, Grok CLI and pi, with team projects for spend per team and privacy controls for the content.