/ Essay · 19 Nov 2026 · 12 min

Read the traces before you write the evals

A conversation with the team at ClickHouse, which acquired Langfuse in January 2026, changed how I think about evals. I had treated an eval as a test you build before launch. They talked about it as something you can also run on live work, using the record of what the agent did.

That record is called a trace, and since that conversation I have been collecting them from every AI tool I use. Measurement has been at the centre of how I work for a long time, and traces give AI work the data source it was missing. This is what I have learned so far, and why I think traces are the most useful thing most people are not yet looking at.

01

The short version

I used to think of evals as tests you run before launch. A trace is the recorded sequence of steps an AI system took to do a task: each model call, each tool it used, how long each step took, what it cost and what came back. OpenTelemetry is the open standard for emitting them. I collect traces in Langfuse and use it to score selected runs. LangSmith is LangChain's platform for the same kind of work. These traces help me see what a task costs, test changes to my setup and evaluate work after launch.

02

Nobody wrote down what the agent did

In normal software, if you want to know what a program will do, you read the code. With an AI agent the code tells you very little. The model decides which tool to call, what to pass it and how to word the answer, and none of that is written anywhere until it happens. Harrison Chase of LangChain made this point in January: in software the code documents the app, and in AI the traces do. Everything you used to do on code, debugging, testing, monitoring, you now have to do on traces.

So what is in one? A trace is the recorded sequence of steps one task took. Each step is a span. A span might be a call to the model, a tool being run, a sub-agent being started or a check being applied, and each one carries:

  • when it started and how long it took
  • which model was called, and how many input, output and cached tokens it used
  • an estimate of what it cost
  • which tool ran, whether it succeeded and what kind of error came back
  • which session, tool and version of the setup it belongs to
  • the prompt and the response themselves, if you choose to record them

One task as a trace · illustrative

Every step of a task is recorded, with its time, tokens and result.

Taskthe trace40.0 s · 38.4k tok
Model callplan3.7 s · 12.9k tok
Toolsearch files0.4 s · ok
Toolrun tests18.5 s · failed
Model callrevise6.2 s · 14.1k tok
Sub-agentreview8.0 s · 7.8k tok
Model callanswer3.2 s · 3.6k tok
0 s10203040

Each span records its start and duration, the model and tokens, an estimated cost, the tool result, the session and version, and the content only if you opt in. Values invented to show the structure.

Cobus Greyling shows why this matters in his LangSmith tracing demo. He ran 26 test questions through a small telecom support agent. LangSmith recorded zero errors, yet 11 answers quoted the wrong price. One tool returned prices without saying they excluded VAT, and the model filled in the gap. Reading the traces side by side revealed the fault before he wrote an eval for it.

03

Pick the standard before the platform

OpenTelemetry is an open standard for how software reports what it is doing. It defines one format for traces, metrics and logs, it came out of cloud infrastructure, and it now has conventions for AI work covering how to record the model name, the token counts and the tool calls. Those conventions are still being worked out, which tells you how new this is.

The practical effect is that the tool you use and the place you analyse its data become separate decisions. Claude Code, for example, exports its own telemetry in this format: sessions, tokens, estimated cost, tool decisions and tool results. I chose Langfuse to receive it because it is open source, it runs on my own machine and it is built on OpenTelemetry. LangSmith, from the LangChain team, does the same job and takes OpenTelemetry data too, and Arize Phoenix, Braintrust and MLflow are others. If you are starting now, settle on the standard first. The platform can change later without losing the data.

04

What I have running

Langfuse runs in containers on my own machine and the data stays there. The AI tools I use each day report into it: Claude Code, Codex, Cursor, Hermes and Gemini through Antigravity, plus some agents I have built myself. Where a tool emits OpenTelemetry natively, I use that. Where it does not, a small script listens for the tool's lifecycle events, a session starting, a prompt going in, a tool finishing, a session ending, and writes them out in the same trace format.

By default it records metadata only: which tool ran, how long it took, how many tokens it used and what that probably cost. Prompts and responses are recorded only for test tasks I choose. It turns out the metadata answers most of what I want to know.

05

What the data shows you

Cost per task is the first thing you see. A subscription hides it, and a monthly bill arrives too late and too aggregated to do anything with. A trace gives you the tokens for each step, so I can see what a piece of work cost and which step made it expensive.

Context is the second, and it surprised me. Most of the tokens in an agent run are input. Every call to the model carries the instructions, the tool definitions and the whole conversation so far, so a long instruction file is paid for again on every call. In one of my own traced runs the model loaded about 13,000 tokens of context to write 466 tokens of output. Traces show you how much context each run loads and how much of it comes from cache.

Tool use is the third. Which tools get called, how often they fail, how long they take, and whether the agent is reaching for things it does not need.

Those three describe what happened. Whether the work was any good needs a score attached to the trace. A score can come from a rule a script checks, from a second model acting as a judge, or from me. Once scores are in place, outcome sits beside cost for the same piece of work, and that pairing is the one I care about.

Evals that run beside production

The live system supplies the test cases, and each change is checked against real runs.

01

Trace

Every run is recorded, step by step.

02

Score

A rule, a judge model or a human rating.

03

Compare

The same tasks with and without a change.

04

Change

A skill, an instruction file, a tool or a model.

Back to 01 with the next runs. A person accepts or rolls back. The loop works on tool use, context, cost and outcome.

06

I tested one of my own skills

A skill is a packaged set of instructions an agent loads for a particular kind of task. I have one that makes the agent write down the goal, the constraints and what done looks like before it starts anything substantial. I liked it. I had no idea whether it added anything.

So I took two real tasks. One was writing a handoff with acceptance criteria for replacing a component. The other was reporting the result of a routine health check. Each ran twice on the same model, once with the skill loaded and once without, and every run was traced and scored against a short rubric.

Skill test · four traced runs · 8 Nov 2026

The skill removed both corrections on the handoff and added 15% to the cost of the routine check.

TaskSkillCorrectionsTimeEst. cost Handoff briefWithout26.9 s5.0c Handoff briefWith08.6 s5.8c Routine checkWithout14.8 s4.6c Routine checkWith16.1 s5.3c

Source: my own Langfuse traces. One run per arm per task on the same model. Corrections scored against a rubric. Costs in US cents, the tool's estimates.

On the handoff, the skill made the difference. The run with it met the brief with nothing to fix. The run without it went over the word limit and invented requirements nobody had asked for. On the routine check, the skill changed nothing about the quality, and the run took longer and cost about 15 percent more. So the skill now loads for multi-step handoffs and stays off for routine checks.

Four runs is a small sample, and the costs are the tool's own estimates because I am on a subscription. What changed for me is how the question gets settled. I used to decide by feel whether to keep a skill. Now the decision has a measurement attached, and I can rerun the same test whenever the skill or the model changes.

07

The eval moves to after launch

The conversation with ClickHouse made me think about what happens after launch. You can still test against a fixed dataset before you release a change. Once the system is live, Langfuse documents how to run evaluators on production traces, so you can score the work as it comes in.

Greyling used the same telecom support agent in his LangSmith evaluation demo. He built a dataset from traces and ran both versions against the same 26 cases. After he revised the system prompt and tool descriptions, the agent passed 25 cases, up from 13.

So you release a change, watch its traces and scores next to the previous version, and adjust while it is live. Evaluation stops being something you finish.

08

Can the setup improve itself?

A harness is everything around the model: the instruction files, the skills, the agents, the tools and the memory. Every one of those is something I can change, and traces let me test a change against real runs. What I am building towards is a loop where the setup learns from its own runs, getting better at tool use, leaner on context, cheaper and more often right.

In their 2026 preprint on agentic harness engineering, Jiahang Lin and colleagues used traces to guide ten rounds of changes to a coding agent's harness. On Terminal-Bench 2, its first-attempt pass rate rose from 69.7 percent to 77.0 percent. The hand-built Codex CLI harness scored 71.9 percent in the same study. Of the tasks the agent predicted its changes would fix, 33.7 percent were fixed. Of the tasks it predicted would regress, 11.8 percent did. The agent missed most of the regressions that actually occurred.

Greyling's conclusion from his LangSmith demo was that you can automate the runs, scoring and comparison, and a person still decides which change to keep. I take two rules from that for my own harness. Every change states up front what it is meant to fix, and every change is easy to roll back when the traces disagree.

09

Where to start

The same questions apply inside an organisation, at a larger scale: what the AI is doing, what it is being asked to do, what each task costs and whether the result is any good. I have written before about how little an adoption average tells you about any of that.

If you run AI tools, they are already emitting most of this. Turn the telemetry on, send it somewhere you control, and read the traces before you write a single eval. I am early in this and it has already changed how I work.

End