LangSmith can now tell you what a merged pull request actually cost. LangChain launched LangSmith for Coding Agents on 18 November 2026, in public beta on LangSmith Cloud, and the idea is simple: instead of reporting tokens consumed, it attributes the spend in each coding-agent trace to the pull request that work produced, then shows cost per merged PR on one overview page. If your team runs Claude Code, Codex, Cursor, Copilot or Deep Agents, this guide shows how to switch that view on, read it honestly, and act on the three numbers that matter.
What is cost per merged PR — and why is it the number to watch?
Cost per merged PR is the total coding-agent spend attributed to pull requests that were merged, divided by the number of merged PRs, over the period you select. It is the unit LangChain puts at the centre of the new dashboard, because it connects money to shipped work instead of to activity. Token counts and session counts tell you how much the team used the tools. Cost per merged PR tells you what each unit of accepted work cost — the figure a finance team can actually budget against.
LangChain frames the problem in its announcement, published 18 November 2026:
“LangSmith now offers reporting built for coding agents, along with new capabilities that tie their spend to the pull requests they produce.”
The context is the scale of the spend. Coding is the largest category of enterprise AI application spend, reaching $34 billion in 2026, according to Menlo Ventures figures cited by LangChain. Yet, as LangChain puts it, most engineering leaders still cannot give an exact answer to what that spend buys. Usage dashboards show tokens consumed; they do not show what the tokens produced. That gap is what this dashboard is built to close — and the first thing to understand is that it only closes it for work that ends in a pull request.
What do you need before you start?
Three things, all of which LangChain states in its documentation. First, a LangSmith Cloud workspace — the coding-agent view is in public beta on LangSmith Cloud, and the pull-request connection and coding charts appear only on agents whose type is set to Coding. It is not available on self-hosted LangSmith for the GitHub connection in the same way; on BYOC and self-hosted installs, GitHub connections use an Engine GitHub App your administrator registers, not a LangSmith-owned app. Second, traces flowing from at least one supported coding agent: Claude Code, OpenAI Codex, Cursor, GitHub Copilot in VS Code, or Deep Agents. Third, a GitHub or GitLab connection with permission to install the GitHub App on your repositories — your GitHub organisation may require an admin to approve it, and on GitLab a workspace admin connects the account in workspace settings.
Two honest limits before you invest time. Pull requests merged before you connect GitHub or GitLab do not appear — cost per merged PR only starts accumulating after the connection is made, so your first week is a baseline, not a verdict. And tracing is not free of cost: coding-agent traces count toward your regular LangSmith tracing usage, and LangChain announced no separate price for the feature and no general-availability date. Our earlier explainer on the full LangSmith week — including the $300 million Series C that funded this rebuild — is the background reading if you want the wider picture: LangChain Raised $300M — Then Showed What LangSmith Does Next
How to set up LangSmith for Coding Agents in 3 steps
LangChain’s own setup is three steps. Follow them in order, and start with one agent and one repository — LangChain’s own advice — rather than wiring up every team at once.
Step 1 — Create an agent with the Coding type
In LangSmith, create an agent and set its Agent type to Coding when you create it, or change it from the agent actions menu. If you send traces with an official LangSmith plugin to an agent ID that does not exist yet, LangSmith creates the agent and sets its type to Coding automatically. Changing the type of an existing agent requires permission to manage workspace settings. You can send traces from all your coding agents to one LangSmith agent, which lets you run the same evaluators on every coding agent and compare them by harness — the coding agent, such as Claude Code.
Then install the LangSmith plugin for each coding agent your team uses. In Claude Code, for example, the plugin installs with three commands run from inside a session:
/plugin marketplace add langchain-ai/langsmith-claude-code-plugins
/plugin install langsmith-tracing@langsmith-claude-code-plugins
/reload-plugins
Admins can install the Claude Code, Codex and Cursor plugins with a mobile device management (MDM) tool and lock the agent and workspace the traces go to, so every engineer’s sessions land in the right place without each person configuring it by hand. That matters more than it sounds: if traces scatter across workspaces, the dashboard can never give you one true number.
Step 2 — Connect GitHub or GitLab and link pull requests
On the agent Overview, click Track pull requests and connect a GitHub or GitLab account. You can reuse a GitHub installation already connected to another agent in the workspace. LangSmith links a pull request when GitHub or GitLab reports activity on it — opening, updating or merging — and matches it to the threads whose traces record the same repository and source branch in their Git metadata.
If a pull request shows no threads, check the Git metadata first. GitHub Copilot records the repository and branch only on the Local harness, and only for a folder with a Git remote. Deep Agents records them unless you turn off Git trace attribution. This is the most common setup failure, and it looks like missing data rather than an error message — so check it before concluding the dashboard is broken.
Step 3 — Open the coding-agent overview and read the first week as a baseline
Open the coding-agent overview page. Before you connect GitHub or GitLab, the summary cards show LLM cost, Threads, Turns per thread, Tokens and Cost per 1M tokens. After you connect, Cost per merged PR, Cache rate and Time to merge (which also shows the merge rate) replace Tokens and Cost per 1M tokens. Each card compares the metric with the previous period, and selecting a card charts it over time.
Do not judge anything in week one. Let a full week of normal work accumulate, then read the three numbers in the next section. A single expensive PR in three days of data is anecdote; a pattern across twenty PRs is a decision.
How to read the dashboard: the 3 numbers that matter
| Number | Where to find it | What it tells you | What to do about it |
|---|---|---|---|
| Cost per merged PR | Summary cards, after GitHub/GitLab is connected | What one unit of shipped work costs | Compare before and after a model change; report this number, not token totals |
| Unattributed spend share | Overview, spend not linked to any PR | How much spend went to review, investigation and exploration | Open the threads; judge whether the work was valuable before calling it waste |
| Cost by conversation length | Overview card, threads grouped by turn count | Whether long threads are driving the bill | Ask engineers to start a fresh thread per task, then check whether long threads fall |
Cost per merged PR is the headline, but the other two stop you misreading it. Unattributed spend is the cost of sessions that never led to a pull request. LangChain is explicit that this is not automatically waste: reviewing code and investigating problems are real work that often does not end in a PR of their own, and the work-type view — which labels threads as feature, bugfix, refactor, investigation, review or off topic — helps explain it. A team whose cost per merged PR looks high may still be taking sound approaches if a large share of its spend is investigation that prevented a bad merge. Open the threads behind unattributed spend and judge what the work actually was before cutting it.
Cost by conversation length is the cheapest lever in the whole dashboard. Spend concentrates in very long threads, LangChain explains, because every new turn carries the whole conversation’s context. The docs put it plainly: each new turn sends the conversation so far, so long threads cost more per turn. If the view shows most of your spend sitting in threads with dozens of turns, the fix is a habit, not a purchase — start a fresh thread per task — and the same view shows a few weeks later whether the habit actually changed. Anthropic’s Claude Code cost guide recommends clearing context between tasks for the same reason, and LangChain cites it in the announcement.
How to find — and fix — your most expensive PRs
Use the Top PRs by cost card. It lists the most expensive pull requests in the selected period, with each one’s state, author, threads, turns and cost, and each row links to the pull request itself. Open the most expensive one and read the threads behind it before deciding anything. LangChain’s announcement names the two usual causes: a thread that kept growing, or a frontier model used on a small fix. Both are visible in the thread — the turn count tells you the first, the model breakdown tells you the second.
Then work the three comparisons the dashboard is built for:
- By model. Group cost over time by model. When your team switches models, compare cost per merged PR before and after the move, and check the merge rate on the Time to merge card in the same period to see whether pull requests still get merged. A cheaper model that halves the merge rate is not a saving.
- By skill. The Skill usage card shows which skills your agents call. When a skill keeps showing up in long, expensive threads, its instructions may be sending the agent through extra turns, and rewriting it could be a quick fix. When a skill shows up in short threads that end in a merged PR, it may be worth getting more of the team to use it.
- By person — for coaching, not blame. Sorting by attributed cost shows which pull requests were the most expensive to produce, and each one traces back to its threads, the models involved and the GitHub user behind it. When one engineer gets the same kind of work merged for much less, find out what they do differently and share it with the team. That is LangChain’s own suggested use, and it is the right framing: the dashboard is a coaching tool, not a leaderboard.
The Cost per PR by state card adds the final check. It shows the average cost of open, closed and merged pull requests, so you can see how much went into work that was closed without merging. Closed PRs are not necessarily wasted — a closed PR can be a correct decision not to ship — but if closed PRs cost nearly as much as merged ones, your team is paying full price for work it throws away, and that is worth a conversation about scoping tasks before the agent starts.
What this dashboard does not do
Four limits, all from LangChain’s own documentation and announcement, that keep the numbers honest. First, it measures cost, not quality: a cheap merged PR that introduces a bug is worse than an expensive one that does not, and nothing in this dashboard reviews code. Second, it only sees traced agents — work done in an untraced tool, or in a Copilot session outside the Local harness, is invisible to it. Third, it is a beta: LangSmith for Coding Agents is in public beta on LangSmith Cloud, with no general-availability date, and the feature set may change. Fourth, it is one of four LangSmith updates announced in the same week — the others are the rebuilt Agent Platform, new trace-data controls and Tool Gateway, the governed tool layer in public beta on Plus and Enterprise plans — and this guide covers only the coding-agent dashboard. Do not buy LangSmith for this view alone; judge it as one part of the platform, and read our guide to setting up your first AI agent if you are starting from zero: Cue by Manus: Set Up Your First AI Agent (2026 Guide)
Our take: report cost per merged PR — and keep the caveats beside it
The reason this dashboard matters is not the charts. It is that engineering and finance finally get the same number: what a unit of shipped work costs. Token totals never gave them that, because tokens are an input and a merged PR is an outcome. The honest way to use it is the three-number report — cost per merged PR, unattributed spend share, and the share of spend in long threads — with the caveats attached: merged PRs are not the only productive work, the first week is a baseline, and cost says nothing about code quality. Run that report weekly for a month. If cost per merged PR falls while the merge rate holds, your model or habit change worked. If it falls because the merge rate fell, you did not save money — you shipped less. That is the test this dashboard sets up, and it is a fair one. Our testing methodology for AI tools, including what we do and do not test hands-on, is here: How We Test AI Tools
Frequently Asked Questions
What is LangSmith for Coding Agents?
It is a public-beta view in LangSmith Cloud, launched 18 November 2026, that ties coding-agent spend to the GitHub or GitLab pull requests the agents produced. It reports cost per merged PR, cache rate, time to merge and merge rate, and breaks spend down by PR state, work type, skills used, most expensive PRs and conversation length.
Which coding agents does it support?
Claude Code, OpenAI Codex, Cursor, GitHub Copilot in VS Code and Deep Agents. Traces from all of them roll up into one dashboard instead of sitting in separate vendor consoles.
How do I set it up?
Install the LangSmith plugin for each coding agent your team uses, connect GitHub or GitLab from the agent Overview by clicking Track pull requests, then open the coding-agent overview page. The agent’s type must be set to Coding, and pull requests merged before you connect do not appear.
Does it cost extra?
LangChain announced no separate price. Coding-agent traces count toward your regular LangSmith tracing usage, and the feature is in public beta on LangSmith Cloud with no general-availability date announced.
Is unattributed spend wasted spend?
Not necessarily. It is the cost of sessions that never led to a pull request, which includes code review, codebase exploration and investigation. Open the threads behind it and judge whether the work was valuable before treating it as waste.
Sources and methodology
- LangChain, “LangSmith for Coding Agents: Now track spend by outcome”, by Jacob Lee, published 18 November 2026 — https://www.langchain.com/blog/langsmith-coding-agents-roi
- LangChain Docs, “Monitor coding agent cost and pull requests”, updated 22 November 2026 — https://docs.langchain.com/langsmith/coding-agents
- LangChain, “LangSmith Tool Gateway: Secure, governed tool use for agents”, published 19 November 2026 — https://www.langchain.com/blog/langsmith-tool-gateway
- LangChain, “The Future of Agents with Harrison Chase” release event, held 20 November 2026 — https://events.langchain.com/on-demand/78972867-6505-4fb9-9eb9-ae776dfbe7ab
- OpenAIMaster.ai, “LangChain Raised $300M — Then Showed What LangSmith Does Next” — https://openaimaster.ai/langchain-300m-langsmith-agent-platform-explained/
- OpenAIMaster.ai, “Cue by Manus: Set Up Your First AI Agent (2026 Guide)” — https://openaimaster.ai/cue-by-manus-setup-guide/
- OpenAIMaster.ai, “How We Test AI Tools” — https://openaimaster.ai/how-we-test-ai-tools/
Method: desk research on 22 November 2026. Every factual claim was verified against LangChain’s own blog post of 18 November 2026 and LangChain’s own documentation, both read in full this run; the $34 billion coding-spend figure is Menlo Ventures’ via LangChain, and the $300 million Series C is LangChain’s own announcement, covered in our 21 November explainer. No example dashboard figures from secondary write-ups were used. No hands-on testing was done — LangSmith’s paid tiers were not used for this article — and that is stated plainly.
Arva Rangwala covers AI news, AI tools, guides and prompts for OpenAIMaster — what is new, what is worth using, and how to put AI to work.


