-
Runs
Every step of a run is a span: a model call, a tool call or a sub-agent, in start order. The example agent here is
ci-fix, Claude Code 2.1.303, headless in GitHub Actions onclaude-sonnet-5-5, asked to make a failing test pass.delegate-1handed the failure to atest-investigatorsub-agent, fixed the code and ended in success.rerun_loop-0ran the failing test again and again, and ended in failure.delegate-1success- llm claude-sonnet-5-5
- tool Agent
- agent test-investigator
- llm claude-haiku-5-5
- tool Grep
- llm claude-haiku-5-5
- llm claude-sonnet-5-5
- tool Edit
- llm claude-sonnet-5-5
- tool Bash
- llm claude-sonnet-5-5
rerun_loop-0failure- llm claude-sonnet-5-5
- tool Bash
- tool Bash
- tool Bash
- tool Bash
- llm claude-sonnet-5-5
-
Paths
A step becomes a token,
kind:name: its signature without its input, so two calls of one tool are the same behaviour whatever the arguments.Repeats in a row fold into one token by bucket, so a loop is one shape, not a tree that grows a level per iteration.
- llm
- Bash
- Bash
- Bash
- Bash
- llm
llm:claude-sonnet-5-5tool:Bash×3-5llm:claude-sonnet-5-5
Repeat buckets Repeats in a row Token 1 tool:Bash2 tool:Bash×23 to 5 tool:Bash×3-56 or more tool:Bash×6+ -
Cohorts
Runs are compared only with runs of the same agent in the same tenant
Foresight guideA run’s outcome is its latest declared
session.outcome, else the status of the span that ended last. A run still active in the last 15 minutes is unknown: left out of every rate, and counted.ci-fixhas 165 completed runs in the last 30 days and 3 in flight. Its base rate is 106 ÷ 165 = 64.2%.-
support-agent180 completedbase rate 54.4%
-
ci-fix165 completedbase rate 64.2%
-
researcher40 completedbase rate 50.0%
-
-
Wilson intervals
Every node carries a success rate and a 95% interval. The textbook interval,
p ± 1.96·√(p(1−p)/n), lies about small samples: for 0 of 3 it says 0.0–0.0%, “give or take nothing”. Wilson’s score interval says 0.0–56.2%, which is what three runs tell you.Wilson 0.0–56.2% textbook 0.0–0.0%
Enter whole numbers, with the successes no more than the runs.
The retry loop’s 3 of 40 is 2.6–19.9% by Wilson, the interval the engine reports for that node (2.6–19.9%); the textbook says 0.0–15.7%.
example0 of 3 0–56%Bash×3-53 of 40 3–20%add_issue_comment20 of 30 49–81%fix & verify45 of 50 79–96%the textbook interval for 0 of 3: a point
-
Fatal forks
A child step is a fatal fork when it sits
at least 25 points below its siblings' pooled rate
a two-sided Fisher exact test puts the difference at p < 0.05
Foresight guidewith at least 3 runs on each side.
ci-fix’s retry loop,tool:Bash×3-5, succeeded 7.5% of the time against 82.4% for runs that did something else after the first model call: p = 5.0 × 10⁻¹⁸.Every node of the map (23)
Every node of the ci-fix Fate Map Path Runs Succeeded Failed Abandoned Rate 95% CI Lift Flag llm:claude-sonnet-5-5165 106 52 7 64.2% 56.7–71.2% 1.00 hotspot, 1.51 bits llm:claude-sonnet-5-5 › tool:Bash80 65 15 0 81.3% 71.3–88.3% 1.26 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-580 65 15 0 81.3% 71.3–88.3% 1.26 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read50 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read › llm:claude-sonnet-5-550 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read › llm:claude-sonnet-5-5 › tool:Edit50 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-550 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-5 › tool:Bash50 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:Read › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-550 45 5 0 90.0% 78.6–95.7% 1.40 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:mcp__github__add_issue_comment30 20 10 0 66.7% 48.8–80.8% 1.04 llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-5 › tool:mcp__github__add_issue_comment › llm:claude-sonnet-5-530 20 10 0 66.7% 48.8–80.8% 1.04 llm:claude-sonnet-5-5 › tool:Agent45 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator45 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-545 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep45 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-545 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-5 › llm:claude-sonnet-5-545 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-5 › llm:claude-sonnet-5-5 › tool:Edit45 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-5 › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-545 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-5 › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-5 › tool:Bash45 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Agent › agent:test-investigator › llm:claude-haiku-5-5 › tool:Grep › llm:claude-haiku-5-5 › llm:claude-sonnet-5-5 › tool:Edit › llm:claude-sonnet-5-5 › tool:Bash › llm:claude-sonnet-5-545 38 7 0 84.4% 71.2–92.3% 1.31 llm:claude-sonnet-5-5 › tool:Bash×3-540 3 30 7 7.5% 2.6–19.9% 0.12 fatal fork, p = 5.0 × 10⁻¹⁸ llm:claude-sonnet-5-5 › tool:Bash×3-5 › llm:claude-sonnet-5-540 3 30 7 7.5% 2.6–19.9% 0.12 Nodes with fewer than 3 runs are pruned (none here). Lift is the node’s rate over the agent’s base rate.
after the first model call
-
Bash65 of 80 -
Agent38 of 45 -
Bash×3-53 of 40
fatal fork: 75 points below
after Bash, a model call
-
Read45 of 50 -
add_issue_comment20 of 30
not flagged: 23 points below
-
-
Verdicts
A run’s path so far is walked down its agent’s map. Its last step is still open: having run the test three times, it may run it again, so it is compared with every run that repeated that step at least as often.
- on_track The interval’s upper bound clears both 50% and the agent’s base rate, on a path with enough history.
- at_risk The upper bound is below the agent’s base rate: runs on this path do measurably worse than the agent’s average.
- likely_failure The 95% interval’s upper bound is below 50%: with 95% confidence, runs on this path fail more often than they succeed.
- novel The run took a step no earlier run of its agent took at that point. The answer says where, what it took, and what the runs that got there did instead.
- insufficient_history Fewer than 30 earlier runs share the path, the agent has no completed runs in the window, or the map was cut short there by its node bound. No guess.
likely_failure upper bound 19.9% < 50%
on_track upper bound 95.7%, above both lines
novel left the map at depth 3
Counting, done carefully.
Foresight never calls a model. Every number is arithmetic over stored spans, with the history it stands on.
Predictive fuses
A fuse policy may set min_success_odds. At the pre-call check, never on ingest, its action applies
when a run’s foresight stands on at least 30 earlier runs, the run has at least
3 steps, and the interval’s upper bound is below the odds. So thin history stops
nothing: 0 of 3 never stops a run.
stop live-ci-doomed-0, before tool:Bash, at odds 0.3: foresight: runs that took this path and then called tool:Bash succeeded 3 of 40 times (≤19.9%)
Calibration
A prediction is only worth what it has been worth: each map predicts every completed run from the half of the cohort it is not in, using only what the run had done by then.
On ci-fix, depth 3 removes 44% of the base rate’s error; a dot on
the diagonal came true as often as it predicted.
Reliability at depth 3
Record your first run in five minutes.
Sign in, create a project, copy a key, set three environment variables.