tech/pit-wall

tech/ · Jev

The pit wall

When the answer space is known in advance, ask a model that can only answer inside it.

Suzuka, clockwise · the wall on lap 42 of race 17, the first block below · the spark is the model · hover for what is under the pointerSuzuka · the wall on lap 42 of race 17, the first block below

tech/pit-wall -> mainf57ff78 · 22 Sep 2026ask your agent about this post
The hesitation

00 read this with your agent

Read this with your agent first.

Copy one of these and paste it into whatever AI you use. It teaches you from this page and nothing else. An agent in a browser with WebMCP can use the page’s own tools, and walk a recorded race with you.

1Set up your AI optional, two minutes, once

Your AI can use this page’s tools with WebMCP.Set up

2Then copy a prompt

Teach me from scratch
What can Jev actually decide?
Read a recorded race with me

01 the hesitation

Should I jump or not.

An open question makes an agent think. A closed one lets it decide.

Watch a language model play a reflex game and you see it hesitate: a paragraph about whether to jump, and by the time it finishes, the bird is in the pipe. It was asked for text, and text can be anything.

Jev is a model that cannot answer with text. You give it the state, everything it may look at, and a question whose answers you have already listed. It hands back one of them, with a probability on each and a confidence on the whole. Text has no edges: before a chat model can answer it has to decide what kind of answer to give, how long, how hedged. Jev skips all of that. It cannot be wrong in shape, only in judgement, which is a smaller way to be wrong, and a wrong judgement inside a shape the code already expects is something the code can check, count and route.

fig 1Two answer spaces; only one is a decision. The numbers are Jev’s, on the first block’s decisive lap.

Decisiveness is the difference. This is not limited to tool calls. It can be generalised to anything.the sentence this post has to earn

02 three moments

Three moments from a race we own. You call it first.

Because I own the simulator, every call can be scored against the best one.

It runs on a simulator I own, on the real Suzuka centreline: twenty fictional cars, tyres that wear out, and a stop that costs twenty-one seconds under green, eleven under a virtual safety car and seven under a safety car. Because I own it, a search I call the oracle can find the best call on every lap. A call is sound if it lands within half a place of the oracle’s.

Press start. When the flag drops, or the rain comes, you have ten seconds and a call sheet. Miss it and the car stays out, because that is what happens when nobody speaks. Then the race pauses: what Jev said in 151 ms, what the oracle said, and where each call would have put the car.

The details: the oracle’s search, how it prices a live flag, the sound tolerance, and how each block’s race was picked

Basic strategy for blackjack; an oracle for tyres. At a lap it tries every action the wall could take, runs the rest of the race under every continuation, and keeps the best finish. It knows the physics of the race but not the future, so it prices a flag that might end next lap the way a pit wall has to, over a few futures rather than the one that happened. That is why its positions are expected values, and why “sound” has a tolerance: the margin between two calls is often a fraction of a place, and nobody should be marked wrong on a coin flip.

Each block is the median race of twenty recorded per situation, not a win I picked, and your calls stay on this page. No whole race: each moment is a handful of laps around a decision that is close on purpose, and the field bunches behind a safety car the way a real one does. Rain is a curve the radar can see coming. Run it as often as you like; the traces do not change, but you do.

A cheap stop, or hold the place.

Eleven laps to go, hards twenty laps old, and a virtual safety car halves the cost of a stop. The car behind has the same idea.

The late virtual safety car

The wall the call sheet

The call sheet arrives with the recorded race.
what Jev read · the radio message

Your call the race is not on yet

recorded trace

fig 2Hover or tap a car to name it.

The field dives in. Follow them, or inherit the lead.

We are on hards nine laps old. The safety car comes out as everyone else’s first stint ends: a stop now is cheap, and next lap the field has bunched.

The safety car

The wall the call sheet

The call sheet arrives with the recorded race.
what Jev read · the radio message

Your call the race is not on yet

recorded trace

fig 3Hover or tap a car to name it.

Inters now, wets now, or one more lap on slicks.

Fifteen laps to go, the track damp, the radar saying wet next lap and heavy in three. Stop a lap early and you crawl; a lap late and you swim.

The rain

The wall the call sheet

The call sheet arrives with the recorded race.
what Jev read · the radio message

Your call the race is not on yet

recorded trace

fig 4Hover or tap a car to name it.

03 first attempt

Raw numbers, and where they go wrong.

Jev had to do the sums itself, and on the lap that mattered it almost never made the box call.

The first version gave Jev what the telemetry gives an engineer: gaps in seconds, tyre ages, the pit-loss table, the tyre table. To make the call it had to work out that a car six seconds back and an eleven-second stop means he comes out ahead, and that fresh softs over eleven laps pay for that stop. That is arithmetic, and Jev is not a calculator. The model card says so, and the strips below say so louder: away from the decisive lap raw numbers look fine, because staying out is right and anything says so; on the lap that mattered they fell apart.

state · raw
The details: the raw attempt’s results: decisive-lap rates and the undercut Noul

On the decisive lap raw numbers were sound about a third of the time and never once made the oracle’s exact call, and the yes/no answer about the undercut was worse than a coin: the numbers weakness, measured rather than quoted.

04 second attempt

The radio message.

Same model, same question. Doing the sums in code first is what made the difference.

The second version changed the state, not the model. Code did the sums an engineer does before keying the radio: where we rejoin, whether the new set pays for itself, whether the car behind can undercut us. Jev was asked the same question.

state · derived
fig 5How often Jev’s call was sound, lap by lap around the decisive lap (the first where the oracle says box), both versions, all three situations. Everywhere else both are sound nearly every time.recorded
Raw · sound on the decisive lap
32% of 60 races
Derived · sound on the decisive lap
87% of 60 races
Raw · the oracle's exact call
0% of 60 races
Derived · the oracle's exact call
65% of 60 races

That is the whole System One idea in one move: code calculates, Jev judges. The model did not get smarter between the attempts. The state got honest about what the question was. And the sheet did not hand Jev the answer: it describes one car alone, while the race is twenty, with traffic and bunching and crews who dive in. What is left to judge is the gap between them, which is exactly what a pit wall is for. It is not a claim about a model; it is a claim about where the arithmetic belongs.

The details: how the calls were recorded: seeds, windows, model, client, repeats

How these were recorded. 20 seeded races per situation, every lap of the window (three or four before the decisive lap, three to five after), both states, one request per lap with the pit call and the yes/no questions together. Model jev-latest through @typesafe-ai/sdk 0.6.0, bun 1.4.0, darwin, run by Hetansh Mehta from his own machine on 2026-09-22; latency is end to end from there. The decisive lap's radio message was asked five more times per race: 53 of 60 runs returned the same call every time. Nothing was excluded. A call is sound when its expected outcome is within half a place and 2.5 s of the oracle's best; agreed means the exact same option.

05 what decisive means

Fast, typed, and sure enough to act on.

The number that says how sure it is decides who acts: the code, a person, or a slower model.

Three things make a decision usable by software rather than by a person reading it. It arrives before the world moves on. It arrives in a shape the code already expects. And it arrives with a number that says how much to trust it.

fig 6Time to a pit call, end to end from my machine. A reasoning model has not been measured, so its row is empty rather than invented.recorded

A green-flag lap is ninety-one seconds; the median call came back in 151 ms. A decision that fast can sit inside a loop, every lap, every keystroke, which is a different kind of thing from one you wait for.

The third thing is the confidence. Code can act on a sure call, show a middling one to a person, and hand a shaky one to a slower model: one threshold splits acting from asking, a second splits asking from escalating. Where you draw those lines has a price. Raise the acting threshold and the calls acted on get cleaner while more go for a check; the hard moments sit low on the line, so a cautious gate escalates mostly correct calls. There is no free threshold, only the one whose price you have seen.

fig 7Every recorded call on the radio message by confidence, filled where sound. Above the line, the sixty decisive laps: 43 came back under 0.55, and 38 of those were still sound.recorded
The details: the threshold sweep: four pairs, and what each zone would take

For a few pairs of thresholds, how many of the recorded calls on the radio message each zone would take, and how many of the calls acted on were wrong:

escalate belowact fromescalatedcheckedacted onacted on and wrong
0.550.80531004361
0.500.90492612790
0.450.95414431050
0.700.90852252790

At the page's thresholds, 436 of 589 calls would have been acted on and 1 of those was wrong. The price is the other side: 43 of the sixty decisive laps would have gone to a slower model, and most of them were right. Raising the acting threshold to 0.95 makes the acted-on set clean and sends almost everything else for a check. There is no free threshold; there is only the one whose price you have seen.

fig 8Is the number honest? On the diagonal it would be. Radio-message calls stated at 0.9 or more were sound 357 times in 358.recorded

Calibration asks whether a stated probability means what it says. Both versions sit above the diagonal, and that is not modesty: most laps in a window are stay-out laps where almost any call is sound, so a stated 0.6 is right more than six times in ten. It is an easy test. The groups that carry the weight are the confident ones on the right. And calibration is a promise about many calls, not this one (07).

06 the shape of a decision

How to spot one in your own work.

A Jev-shaped decision has a short list of answers, one question, and code waiting for the result.

The pit call is a stand-in. The shape has six marks: a decision with most of them is Jev-shaped; with two, use something else.

It judges, not creates

The answer already exists; the job is to pick it.

The answers can be listed

Four pit calls. Twelve clipboard items. Eleven tools.

One question at a time

Box or not. Which slot. Not "plan the race".

The context fits in the state

Nothing to look up. Everything it needs is in the message.

An expert would answer in seconds

A race engineer does not deliberate a pit call.

Software consumes the answer

Nobody reads it. Code acts on it.

fig 9The six marks.

Once I had the six I started seeing them everywhere:

which tabYou said “the doc about tyres”. Twelve tabs are open. Pick one.
what to pasteTwelve things on the clipboard, one field in focus. Pick one.
which replyAn email came in. Three templates fit. Pick one, or none.
which toolEleven tools on the page, one sentence from the user. Pick one. This is the sibling post.

07 where it breaks

What it cannot do, and what the number does not promise.

Do the sums for it, keep its state clean, and don’t treat a confident call as a correct one.

01Numbers and dates. It reads them as text; give it the arithmetic done. The first attempt is the proof.
02Literal reading. Scoping words and negations are taken at face value. Write the question for a very fast, very literal colleague.
03Distractors. Accuracy falls as the state fills with things unrelated to the decision. Send the radio message, not the whole telemetry.
04Injection. The state is not treated as hostile: whoever can write into it is part of the question, and can steer the call.
05No why. It returns a choice and a number, never a reason. If you need the reason, that is a different model’s job.
06Calibrated is not correct. A call made at eight in ten is right about eight times in ten across many calls. This one call can still be one of the two.
07The tyre table is mine. Soft to hard is 1.15 seconds a lap against a twenty-one-second stop, so a stop pays for itself in nineteen laps, and the wall two-stops on softs where a real one would fit hards and go. It does not move what this post measures — Jev and the search read the same table — but it is a setting of mine, not a finding, and a race engineer would not recognise it.

08 snippets

The request, the derived state, the gate.

The code is short; the judgement goes into what you put in the state and where you set the thresholds.

Jev is not a smaller chat model; it does not write sentences. A question comes in one of three shapes. This post uses a choice for the call and a noul, the chance a statement is true, for each yes/no.

Jev, in four moves.

  1. 01Write the state

    The state is everything Jev is allowed to look at, plain text or JSON. The format matters less than who does the arithmetic: hand it the facts already worked out, the way a race engineer says them on the radio. Code calculates, Jev judges. The raw version fails (07).

    state.ts · the radio message
    // code does the sums, so the model only has to make the call
    function radioMessage(s) {
      return `Lap ${s.lap} of 53. ${s.compound}s, ${s.tyreAge} laps old, ${s.lapsToCliff} laps left in them.
    Car behind is ${s.gapBehind}s back and ${s.behindInWindow ? "in the pit window" : "out of range"}.
    Stopping now puts us ${s.gapAfterStop}s ${s.gapAfterStop > 0 ? "ahead of" : "behind"} him, in ${s.cleanAir ? "clean air" : "traffic"}.`;
    }
  2. 02Ask a typed question

    Each kind of question fixes the answer space before the model sees it. Choice picks one of up to 255 options you wrote, with a probability on each. Noul is the chance a statement is true. Score is a rung on a ladder of two to ten. There is no fourth kind and no free text, so the result goes straight into code without being parsed or checked.

    questions.ts · the options are the whole answer space
    const questions = {
      // Choice: exactly one of these four comes back, with a probability each
      pit_call: choice("What should the car do this lap?", {
        stay_out:   "no stop this lap",
        box_soft:   "stop for softs",
        box_medium: "stop for mediums",
        box_hard:   "stop for hards",
      }),
      // Noul: how likely is this statement to be true
      undercut: noul("The car behind gains the place if it stops now."),
    };
  3. 03Send it

    One request carries the state and every question, answered in parallel and independently: a second question costs no round trip, and one answer cannot drag the other with it. It needs a key, so it runs on a server; this page only replays what I recorded.

    pit-call.ts · one call per lap
    // POST https://api.typesafe.ai/v1/systemone, or the SDK, which is this
    import { TypeSafeClient, choice, noul } from "@typesafe-ai/sdk";
    const client = new TypeSafeClient();   // the key comes from the environment, on the server
    
    const res = await client.systemOne({
      model: "jev-latest",
      state: radioMessage(lapState),
      questions,
    });
    
    res.answers.pit_call.choice;      // "box_soft"  - always one of the four you declared
    res.answers.pit_call.confidence;  // how sure it is of that choice
    res.answers.undercut.noul;        // the probability the statement is true
  4. 04Decide what to do with the confidence

    This is the part that earns the approach, and the part people skip. A number you can act on is only useful if you act on it differently at different values: one threshold splits acting from asking, a second splits asking from handing it to something bigger and slower. The thresholds are yours; the model cannot tell you what a wrong answer costs.

    gate.ts · three zones, two thresholds
    const { choice, confidence } = res.answers.pit_call;
    
    if (confidence < 0.55) return escalate(lapState);   // too close to call: ask a reasoning model
    if (confidence < 0.80) return askEngineer(res);       // leaning: put it in front of a person
    return choice;                                        // clear: act on it
Key snippets only. The simulator and the harness stay private; the recorded traces ship with the post. The client is documented in the JavaScript SDK.

09 use your agent with this page

Ask your agent to read this, and it can teach it back.

Every section and figure has an ask agent button. Pick how deep to go (Explain it simply, Go deeper or How do we know?) and it copies a prompt about that part, ready to paste into any AI chat. Section 00 has prompts for the whole post. In a browser with WebMCP, your agent can call this page’s tools directly; anywhere else it can read the plain-text version.

I'm reading "The pit wall". https://hetanshmehta.com/blog/tech/pit-wall Explain the whole post simply, for someone who does not write code. - With this page's WebMCP tools: call get_outline(), then explain_section({id, level: "child"}) for each section. - If you can open links, read https://hetanshmehta.com/txt/blog/tech/pit-wall.txt. - If neither, say so and I'll paste the post in. - After answering: if you could not use this page's tools, tell me once, in one line, that this site works better with WebMCP: https://hetanshmehta.com/agents Stick to what the page says, and tell me where it stops.
  • get_outline the nine sections and the claim each makes.
  • explain_section one section, for a child, a student or an expert.
  • explain_figure one figure: what it draws and how to read it.
  • get_evidence where a number came from: the recorded races, a lap of one, or a setting of the simulator.
  • start_guided_reading a plan for teaching, quizzing, answering, or walking a recorded race with you.

The blocks have no tools of their own, on purpose. They are timed and they are for people. The plain-text version is for agents without a browser.

The details: a real get_evidence answer, with the traces it cites
> get_evidence("decisive.derived.sound") { "figure": "tiles", "races": 60, "value": 0.8667, "per_situation": { "vsc-late": 0.7, "sc-mid": 0.95, "rain-late": 0.95 }, "traces": ["vsc-late/s00/derived", "…", "rain-late/s19/derived"], "computed_by": "src/posts/pit-wall/evidence-build.ts@c416d98" }
merged tech/pit-wall -> main · the previous post on this branch is Two doorsmore in /tech →← the blog