Judgment is now publicly available.Get started

Long-Horizon Trajectories, Small Questions: Evaluating Agents with System One Models

How we use preprocessing and System One models to evaluate long-horizon trajectories at ~600x lower cost and 47x lower latency than an LLM reading the full trajectory.

Sailesh Polavarapu, Andrew Li10 min read

Evaluating every agent run at scale

As of early 2026, OpenAI’s APIs process more than 15 billion tokens per minute, and a growing share of inference calls come from long-horizon agents. Teams that want to understand those trajectories end up asking lots of small questions about them. Did the user sound frustrated on this turn? Did the agent try to do anything malicious, or even consider it? They need these answers to monitor agent traffic, curate RL datasets, and run large-scale transformations over their data.

This is usually done with a frontier LLM or a full agent, which is slow and expensive for questions that are often simple and narrowly scoped. A smaller, faster model could answer many of them, but long-horizon trajectories often exceed its context window. Because these questions are narrow, though, the evidence they need usually is too. The opening is to cheaply extract just that evidence, such as the user's messages or the output of a specific tool call, and hand it to a System One model.

Doing this lets you evaluate more of your data, faster and more cheaply, which gets you three things:

  • Faster answers. Each evaluation returns sooner, whether you’re monitoring live traffic or analyzing it after the fact. When an agent starts reasoning about doing something malicious, you find out in time to step in, and offline analysis that used to take hours finishes in minutes.
  • Better coverage. Lower cost means every trajectory can be evaluated, not just a sample. You can find every user who got frustrated, and who they are, so no customer slips through.
  • Better search. Evals become an index over your agent data. Once every trajectory is labeled, you can answer natural-language questions across your whole history more accurately and at lower cost.

How we use System One models as graders

System One models, as our friends at TypeSafe call them, are decision models built to classify narrow questions quickly and cheaply. Instead of generating text, they take some state and a typed question, then return a structured answer that code can act on. Jev, TypeSafe’s first System One model, is now used by 30% of the Fortune 500 and trusted with some of the most mission-critical decisions in software, from building Workday’s interface as you type and making split-second calls inside Glean’s search assistant to helping our engineer’s Minecraft agent decide whether to fight or flee.

Grading agents is a similar problem. Many evals come down to a narrow question, like whether a user sounded frustrated. To see where System One models fit, we started with their tradeoffs against LLMs.

Where System One models are strong

  • Fast. System One models return an answer directly instead of generating a response token by token. In our test on real coding agent trajectories, a Jev call took a median of 0.15 seconds, compared with 1.7 seconds for GPT-6 Luna on the same evidence and 6.9 seconds for GPT-6 Luna reading the full trajectory. That latency can drop even further when the models are self-hosted.
  • Cheap. Jev costs about 3x less than GPT-6 Luna per uncached input token, and it doesn't charge for output tokens because it doesn't generate any.
  • Confidence scores. System One models return a probability for each option, plus a confidence score from 0 to 1 that says how concentrated those probabilities are: 1 when all the probability sits on one answer, 0 when it's spread evenly. Code can use it to decide when to trust a result and when to escalate. TypeSafe trains Jev with Reinforcement Learning for Calibrated Decisions (RLCD), which teaches it to return decisions and calibrated probabilities instead of generated text. Across many predictions, answers Jev assigns an 80% probability should be correct about 80% of the time.
    • LLM-based evals are much harder to calibrate. Token probabilities aren't available on many recent models, and a confidence score the model writes itself is shaped by patterns in its training data rather than real uncertainty. For example, ask an LLM for a random number between 1 and 100, and it often returns 42 instead of an even spread. 42 is famous as the answer to life, the universe, and everything in The Hitchhiker's Guide to the Galaxy, so it shows up far more often in the text these models learn from. You can rerun the same eval several times and measure how often the answers agree, but that's cumbersome and multiplies the cost.

Where System One models are a bit weaker

  • No text output. System One models return a choice and its probabilities, but don't generate any text. If you want an explanation behind an eval decision, you have to get it elsewhere.
  • Smaller context windows. Jev reads up to 64k tokens per request by default. Its long-context mode raises that to 262k, but TypeSafe notes that it is slower and less accurate, and long-horizon trajectories can exceed even that.
  • Less reasoning than LLMs. System One models are built for quick, gut-check judgments, not extended reasoning. A rubric like "Did the agent solve the problem and communicate it clearly?" should be broken into separate evals, such as "Did the agent complete the requested task?" and "Did the agent clearly explain what it did?"

These strengths and weaknesses tell you which of your rubrics can use a System One model. A rubric for an eval is eligible when you don't need a written explanation, the judgment is an easy call, and the evidence is small. The first two depend entirely on the rubric. The third depends partly on the rubric, which determines where the evidence lives, and partly on engineering. Long-horizon trajectories are far larger than what most evals need, so if the evidence sits in a predictable place, we can shrink what the model reads to just that part. The same goes for any model: if you want to use smaller models or get more accurate search across the evals you care about, start by narrowing what the model has to read.

How we do preprocessing

Preprocessing is how we narrow the trajectory data down. Before the System One model runs, code parses the relevant evidence out of the trajectory, so the model only reads what matters. This only works if that evidence is addressable, bounded, and sufficient:

  • Addressable. Code can reliably locate the evidence within the trajectory, such as in the first three user turns or right after a specific tool call.
  • Bounded. The extracted evidence reliably fits under a set limit, like the System One model's context window.
  • Sufficient. The evidence contains everything the rubric needs. The first two user turns can tell you what a user came to do, but they can't tell you whether the user's request changed over the conversation.

For each judge, the Judgment Agent reads the rubric and explores the project's trajectories to check these conditions. If they hold, it writes preprocessing code, tests it on real trajectories, and attaches it to the judge. If they don't, the judge stays on Agent-as-a-Judge, which can read more of the trajectory.

Code pulls out the evidence arubric needsTwo rubrics read the same codingsession.That evidence is spread out, soAgent-as-a-Judge reads the sessionCoding session · 184 eventsUserAgentTool callTool resultFix verifiedRubricDid the agent's editactually fix the bug?Needs: edit + test outputEvidenceSpread outEditauth.ts, event 121Test12 passed, event 163Plus every event between themAgent-as-a-JudgeReads the full trajectoryRead edit at event 121Read tests at event 163
Step 6 of 6
Jev classifies the opening request from one extracted turn. To check whether the fix worked, the evidence is spread across the session, so Agent-as-a-Judge reads the full trajectory.

Sufficiency matters most, and it's the hardest to guarantee. It builds on addressability: an eval can only be as complete as the places we told it to look. Code can check that it found the evidence and that it fits, but it can't know whether something important lives outside what it extracted. The System One model has the same blind spot. It only sees what it's given, so it can return a confident answer from an incomplete picture. We only recommend using this optimization if you're confident that everything the rubric needs lives within your addressable evidence window.

You can build that confidence before turning it on. Run the preprocessed judge on a sample of trajectories and have a reviewer who can read the full trajectory, ideally a human, label the same cases. Where they disagree, check whether the answer lived outside the extracted evidence. If it did, the evidence isn't sufficient, and that rubric should stay on an LLM-as-a-Judge or Agent-as-a-Judge.

Here's an example. Say you're building a coding agent and want to understand what your users are asking it to do. Are they fixing bugs, building features, refactoring, or something else? You could answer this with an eval that classifies each user's opening request:

The user task type evalWhat is the user's opening requestmainly asking the agent to do?Preprocessing code// Preprocessing: keep only// the opening requestasync ({ trajectory }) => {for (const turn of trajectory.turns) {if (turn.role === "user") {if (!turn.text.trim())throw "empty request";return { opening_request: turn.text };}}// falls back to Agent-as-a-Judgethrow "no user turn";}EvalUser task typeBug fixfix broken behaviorFeaturebuild new functionalityRefactorrestructure codeTestswrite or repair testsExplainexplain the codeOthernone of the above
The preprocessing code keeps only the user's opening request, which is all this eval needs.

We tested this approach on a similar topic classification eval using 87 trajectories from a customer's analytics agent. The longest trajectory was about 900,000 tokens. First, the Judgment Agent explored the project's trajectories to check the three conditions above. It found that the evidence for topic classification always sat in the user's first few turns, usually the opening question. Before turning preprocessing on, we calibrated it with the review described above, comparing the preprocessed judge's answers against labels from a reviewer who read the full trajectory. Then we compared four setups. Agent-as-a-Judge explored each full trajectory itself, and LLM-as-a-Judge received the entire trajectory in one call. The preprocessed setups kept the same rubric and categories, but only received the user's opening question extracted by our code:

One extracted turn is enough toclassify the taskA topic eval from a customer'sanalytics agent, run on 87trajectories.Agent judgefullLLM judgefullLLMopeningJevopeningAgreement with human-verified labels86.2%75/8783.8%62/7483.9%73/8786.2%75/87Cost per 1,000 evals$0.74$33.70$0.19$0.05Mean latency15.0 s5.7 s1.85 s123 msTrajectories that fit87/8774/8787/8787/87
Agent-as-a-Judge and both LLM setups use GPT-6 Luna. Agreement is the percentage of predictions that match the human-verified reference labels.

This example had no fallbacks, so it shows the best case. In production, some trajectories fall back to Agent-as-a-Judge when the evidence is too large, the trajectory has an unexpected structure, or the System One model isn't confident. Those fallbacks cost as much as a normal agent judge run, but even so, preprocessing has cut eval cost by up to 80% for our customers' current setups.

How a System One eval runsMost evals settle on the fast path. Therest fall back to Agent-as-a-Judge.Most evals settle on the fast pathTrajectoryOne agent runPreprocessing codeSandboxed per judgeJevSystem One modelWithin context windowVerdictLabel and confidenceConfidence ≥ 0.5Agent-as-a-JudgeExplores the full trajectory itselfScript fails or times out,or evidence exceedsthe context windowConfidence< 0.5This loopJev12Fell back4~0.1 s vs ~20 s per eval
Step 5 of 5
Most evals settle on the System One model. When the script fails, the evidence is too large, or confidence is low, the eval falls back to Agent-as-a-Judge.

How we run preprocessing at scale

Preprocessing means running generated code over customer data, often across thousands of trajectories for a single judge. To work in production, that code has to stay safe, cheap, and up to date.

Keeping it safe

We run preprocessing code in Cloudflare Isolates, which are lightweight sandboxes. A Deployed Worker receives each request and runs the code inside a Dynamic Worker loaded at runtime. Each Dynamic Worker has two hard boundaries:

  • No network access. It can't make outbound connections. To read data, it calls an RPC stub, and the trusted Deployed Worker runs the authenticated, read-only query through vSQL. Credentials never enter the sandbox.
  • No control over tenant scope. The code can write the query text, but the Deployed Worker supplies the organization, project, and trajectory ID from the evaluation request.
How preprocessing code runs safelyThe script has no network and no sayover whose data it reads.Later evals for the same judge reuse thesame Dynamic WorkerEval serviceOne request per evalDeployed WorkerTrusted, holds the credentialsScope from the requestOrg, project, trajectoryDynamic WorkerIsolate, one per judgePreprocessing scriptReused, same script IDInternetNo networkRPC stubRead-only query(sql)vSQLRuns it with that scopeTrajectory dataThis trajectory onlySame script, more runsRuns1,000Workers created1$0.002 a day, not $2.00
Step 4 of 4
The Deployed Worker supplies the scope and holds the credentials. The script runs in an isolate with no network access and reads data only through a read-only RPC stub.

Keeping it cheap

We only keep the savings if running the code costs very little. We originally used Cloudflare's .load() method, which creates a new Dynamic Worker on every execution. Cloudflare charges for Worker creation separately from CPU time, so even fast code gets expensive when it runs thousands of times.

But a judge runs the same code across every trajectory. So we made each script immutable and gave it a stable ID, which lets .get() reuse the same cached Worker. At Cloudflare's rate of $0.002 per Worker per day, running one script 1,000 times in a day looks like this:

Running one script 1,000 times ina day.load().get()Workers created1,0001Creation charge$2.00$0.002

This excludes included allowances and request and CPU charges, which are minimal for our workloads.

Reuse does introduce one risk: anything a script stores outside its main function, such as a top-level variable, can carry over into its next run. Cloudflare doesn't guarantee reuse, so a script that relies on that state can return different results for the same trajectory. It can't leak data across customers, since each script belongs to one judge. We instruct the Judgment Agent to avoid global state, since it leads to undefined behavior.

Keeping it up to date

Preprocessing code depends on both the judge's rubric and the shape of its trajectories, and both change over time. When a rubric changes, the evidence it needs may change too, so we treat it as a new judge version, turn the System One model off, and have the Judgment Agent reassess the judge. When a trajectory's structure changes, validation checks in the code catch the mismatch and send the eval to Agent-as-a-Judge instead of passing the wrong evidence to the System One model.

Validation only catches changes big enough to break the code, though. To catch quieter drift, the Judgment Agent backchecks the judge on a schedule, rerunning a sample of recent trajectories through Agent-as-a-Judge and comparing verdicts. If agreement drops, it reruns the sufficiency review and updates the code.

Results

To test this on public data, we used SWE-chat, a dataset of real coding agent sessions from open-source developers. We sampled 256 long-horizon coding trajectories in which the agent made at least 100 tool calls and the user sent at least three messages, taking no more than three from any repository. The median trajectory had about 180 tool calls and 117K tokens, and the largest reached about 757K tokens.

We kept six rubrics whose evidence could be located with code but still needed semantic judgment. For each one, the Judgment Agent who could read the full trajectory checked a sample of cases and confirmed that the extracted evidence held everything needed to answer. We wrote other rubrics too, and dropped them, mostly because the extracted evidence fell short. Most of those missed in only a few cases, where the deciding context sat just outside the extracted window. Here are the six we kept:

Six rubrics whose evidence codecan locateEach still needs semantic judgment oncethe evidence is extracted.Explicit constraintDid the user set a rule for how the workmust be done?First three user messagesUser frustrationHow frustrated is the user across thesession?All user messagesCommand purposeWhat is this shell command mainly for?The commandAssistant planDoes this assistant message lay outseveral future steps?The assistant messageAssistant hedgingHow certain is this assistant messageabout its claims?The assistant messageCompletion claimWhat does this end-of-turn message claimabout the work?The end-of-turn message

We compared three setups across 1,536 evals, each answering one rubric per call:

  • GPT-6 Luna on the full trajectory, at high reasoning effort
  • GPT-6 Luna on only the evidence extracted by preprocessing
  • Jev 1.13 on only the evidence extracted by preprocessing

Preprocessing reduced the median input from about 117K tokens to under 500. To measure agreement, we treated Opus 5.5's labels as the gold labels.

Same agreement, at a fraction ofthe cost and latency6 rubrics on 256 SWE-chat trajectories,1,536 evals per setup, one rubric percall.Agreementabout the sameGPT-6 Luna, full trajectory79.8%GPT-6 Luna, preprocessed81.4%Jev, preprocessed82.5%Cost per 1,000 evals600x cheaper with JevGPT-6 Luna, full trajectory$21.76GPT-6 Luna, preprocessed$0.11Jev, preprocessed$0.04Median latency47x faster with JevGPT-6 Luna, full trajectory6.9 sGPT-6 Luna, preprocessed1.7 sJev, preprocessed0.15 s
Agreement, model cost, and median latency for the three setups. Costs cover model usage only.

On these rubrics, Jev with preprocessing matched GPT-6 Luna reading the full trajectory, with 82.5% agreement against 79.8%, at about 600x lower model cost and 47x lower latency. GPT-6 Luna on the same extracted evidence reached 81.4% at under 1% of its full-trajectory cost, so most of the savings come from preprocessing itself, and Jev cuts cost and latency further still.

The results varied by rubric. Jev scored highest on explicit constraints, hedging, and plans, GPT-6 Luna on the extracted evidence scored highest on command purpose, and GPT-6 Luna on the full trajectory scored highest on frustration.

Agreement by rubricAgreement with labels on every eval,256 per rubric.GPT-6 Luna, full trajectoryGPT-6 Luna, preprocessedJev, preprocessed70%80%90%Explicit constraintJev 82%Luna pre 79%Luna full 73%Assistant hedgingJev 86%Luna pre 80%Luna full 80%Assistant planJev 85%Luna pre 83%Luna full 82%Completion claimJev 80%Luna pre 79%Luna full 79%Command purposeJev 90%Luna pre 93%Luna full 89%User frustrationJev 73%Luna pre 74%Luna full 75%
Agreement with labels on every eval, 256 per rubric.

Where evals are headed

Good analysis of agent trajectories depends on infrastructure that can store and search them, which means running AI models over all of that data. Preprocessing lets teams use System One models for this today, at a fraction of the cost. Context windows will keep growing, but trajectories are growing faster, so narrowing what a model reads won’t go away. It will just cover more of your rubrics, and the same preprocessing can feed any model.

We think teams will soon run tens of thousands of System One and large language models across their agent data to analyze what their agents do, curate datasets for post-training and RL, and drive self-improvement.

As agents take on more important work, no one will be able to read everything they do. The teams that improve fastest will be the ones that can ask any question of every trajectory, cheaply and reliably, in effect running AI transformations over every agent trajectory. That’s the data infrastructure we’re building.

Thanks to the TypeSafe team for reviewing this post. We’re excited to see Jev power more and more applications.