Repeated work across your team is a great place to look for potential coding agent optimizations. For example, an agent runs the wrong test command. You correct it in your session and keep going. But later, someone else on your team has to make the same correction. That one wrong command has now consumed unnecessary tokens and engineering time twice.
Finding patterns like the example above gives you specific areas to focus on for cost reduction. You can update the shared repo instructions, then check if the fix leads to fewer attempts and fewer tokens.
You can now trace and inspect your team’s coding agent sessions in Braintrust. Get information about what specifically is driving model costs, identify recurring problems, and use the evidence to improve the agents and workflows your team uses. Then review suggested fixes and measure the impact of your changes. Coding agent insights is available in public preview for all Braintrust SaaS and BYOC customers, and for self-hosted customers starting with dataplane 2.13.
Start by understanding which work accounts for most of your spending. In the coding agent insights dashboard, you can track cost and tokens over time and investigate activity by developer, model, tool, branch, or API key. Select a row to open the sessions behind it, or ask Loop to investigate the activity in natural language.

An expensive session could be something like a complex migration or repeated unsuccessful attempts to edit a file. Understanding what’s going on in a specific session helps you find opportunities to reduce unnecessary work and spend.
Costs come from traced model calls and may differ from your provider's subscription bill.
You might see a problem appear across several sessions. Multiple developers on the team might be explaining to their agents how to run a local environment for a particular repo or telling them to stop editing generated files.
Set up a daily analysis to automatically surface issues like this across your team’s sessions. The coding agent insights cookbook walks you through how to add Topics to organize sessions and Loop automations to find recurring problems.

You can review the findings in Patterns and drill down to the exact sessions where the issues were found. Loop is there to help you with any follow-up questions. For example, in the case of running the local environment, you can check which instructions the agents had available and whether the correct command was missing. This gives you a specific change to make.
Use your findings to improve the instructions, skills, or tools your agents are already using. Use Copy for agent to pass a finding and its supporting evidence directly back to your coding agent to help implement the fix.

Check back in afterwards and compare the number of attempts and model costs. Consider differences in task difficulty and model choice when comparing results. A lower weekly total could mean your team did less work. Completing similar tasks with fewer failed attempts and lower costs gives you better evidence that the change helped.
You can connect Claude Code, Codex, OpenCode, Pi, Antigravity, or Grok through the bt tracing integration.
Set up a dedicated project for your team's coding agent sessions and enable tracing from each team member’s development stack, using their own credentials. Once the first trace arrives, open Dashboards and select Coding agent insights.
Find opportunities to improve your agents and reduce unnecessary spend. Get started with Braintrust or book a demo.