LangSmith now ties coding agent spend to pull requests, so teams can see cost per merged PR across Claude Code, Codex and Cursor
LangChain shipped a way to answer what a coding agent's token bill actually bought.
What happened
On November 18, LangChain released LangSmith for Coding Agents in public beta on LangSmith Cloud. It traces Claude Code, OpenAI Codex, Cursor, GitHub Copilot in VS Code and Deep Agents into one dashboard, then links each thread to the GitHub pull requests or GitLab merge requests it contributed to. The attribution handles one thread opening several PRs and one PR taking several threads.
The dashboard reports cost per merged PR, cost by PR state (open, closed, merged) and time to merge. Spend that never produced a PR, such as code review or investigation, is shown separately as unattributed, and each thread is labeled by work type: features, bug fixes, investigation, code review. It also shows which skills agents call and how cost grows with conversation length. The docs note that PRs merged before you connect GitHub don't appear, so history starts from setup.
LangChain says spend concentrates in very long threads, because every turn carries the full context, and points to Anthropic's Claude Code cost guide, which recommends clearing context between unrelated tasks.
My take
Cost per merged PR is a better unit than tokens per seat, because it is the number a finance team can compare against a contractor's invoice. It has limits, and LangChain is upfront that review and investigation work often doesn't end in a PR. I'd read the unattributed bucket as a question to look into, since it usually holds a mix of useful work and long, wandering sessions.
The two practical uses I see are model changes and habits. When a team moves subagents to a cheaper model, you can check that cost per merged PR fell and merge rate held. And when one developer ships the same kind of change for a fraction of the cost, the threads show why, often a fresh session per task instead of one thread kept open all day.
Setup is a plugin per agent plus a GitHub connection. I'd start with one repo for two weeks and look at the longest threads before changing anything.
More posts
- Open OCR models now read 1,000 pages for under $0.10, and better serving saved more than switching modelsNov 20, 2026
- Gemini 4 Neon costs $3 in and $15 out per million tokens and tops Zapier's AutomationBench at 56.3%, though it uses more output tokens per taskNov 20, 2026
- Gemini API's Tool Retrieval loads tool schemas only when the model asks for them, so agents with hundreds of tools send fewer input tokensNov 20, 2026
