Course contents 27 / 27

27 / 27 · Evaluation and Safety

Open problems

What is still unsolved for agents: reliability over long tasks and how errors compound, memory that keeps learning, world models, valid evaluations, cost, ecosystems of many agents and safety at scale, with what the course left out and the course in one paragraph.

On this page 11

The previous three notes asked how to measure an agent, how to defend it, and how to keep it pointed at what we meant. Each ended with limitations that are not engineering details but open questions. This last note collects them. It starts with the one that most limits what agents can do today, reliability over long tasks, because it has a clean mathematical core, and then surveys the others more briefly: memory that learns, world models, evaluations that stay valid, cost, many agents together, and safety at scale. It ends with what the course did not cover and where to go for it, and with the course in one paragraph.

Notation. A task takes nn steps. Each step succeeds with probability pp and fails with probability e=1−pe = 1 - p. A noticed error is repaired with probability ρ\rho. A verifier checks a segment of mm steps, catches a bad segment with probability dd and rejects a good one with probability ff; a rejected segment is redone at most rr times. For time horizons, tt is the human time of a task and hh the 50% horizon, as in Evaluating agents.

Baseline: every step must succeed#

The simplest model of a long task is a chain of independent steps, each of which must succeed:

  P(success)=pn  \boxed{\;P(\text{success}) = p^n\;}

It decays exponentially in nn, and slowly enough to look harmless for short tasks. With p=0.99p = 0.99, ten steps succeed with probability 0.9040.904, a hundred with 0.3660.366, five hundred with 0.0070.007. Half of all tasks fail once pn=1/2p^n = 1/2, at n1/2=ln⁡2/(−ln⁡p)n_{1/2} = \ln 2 / (-\ln p): 69 steps for p=0.99p = 0.99, 13.5 for 0.950.95, 6.6 for 0.90.9. A model that looks excellent on single steps, right 99% of the time, is a coin flip on a task of seventy steps. The NLP course and ReAct and the agent loop met the same arithmetic; here it is the starting point for asking what changes the exponent.

Long-horizon reliability and error compounding#

Three things break the baseline, and each is an open problem in its own right.

Recovery. If an error is noticed and repaired with probability ρ\rho, a step fails for good only with probability e(1−ρ)e(1 - \rho), so P=(1−e(1−ρ))nP = (1 - e(1 - \rho))^n, as derived in the ReAct note. With e=0.01e = 0.01 and ρ=0.6\rho = 0.6 the effective error rate is 0.0040.004, and a hundred steps succeed with 0.6700.670 instead of 0.3660.366. Recovery divides the exponent; it does not remove it.

Verification at checkpoints. A stronger lever is to check work in segments and redo what fails, as coding agents do when they run the tests. Every mm steps a verifier inspects the segment. A segment of mm steps is right with probability s=pms = p^m, and one attempt at it ends in one of three ways:

P(accepted, right)=s (1−f),P(rejected, redone)=a=sf+(1−s) d,P(accepted, wrong)=(1−s)(1−d)the error the verifier misses.\begin{aligned} P(\text{accepted, right}) &= s\,(1 - f), \\ P(\text{rejected, redone}) &= a = s f + (1 - s)\, d, \\ P(\text{accepted, wrong}) &= (1 - s)(1 - d) && \text{the error the verifier misses.} \end{aligned}

The segment succeeds if some attempt is accepted while right, after jj rejections, with at most rr redos:

P(segment)=∑j=0raj s(1−f)the first j attempts rejected, then one accepted and right⇒P(task)=  (s(1−f)∑j=0raj)n/m  n/m segments, independent.\begin{aligned} P(\text{segment}) &= \sum_{j=0}^{r} a^j \, s (1 - f) && \text{the first } j \text{ attempts rejected, then one accepted and right} \\ \Rightarrow\quad P(\text{task}) &= \boxed{\;\Big(s (1 - f) \sum_{j=0}^{r} a^j\Big)^{n/m}\;} && n/m \text{ segments, independent.} \end{aligned}

With p=0.99p = 0.99, m=10m = 10, d=0.9d = 0.9, f=0.05f = 0.05 and r=2r = 2: s=0.904s = 0.904, a=0.0452+0.0861=0.1313a = 0.0452 + 0.0861 = 0.1313, P(segment)=0.904⋅0.95⋅(1+0.1313+0.0172)=0.987P(\text{segment}) = 0.904 \cdot 0.95 \cdot (1 + 0.1313 + 0.0172) = 0.987, and a hundred steps succeed with 0.98710=0.8750.987^{10} = 0.875, at an expected cost of 108 steps instead of 100.

Figure

How errors compound over n steps, and what verification and recovery do

How errors compound over n steps, and what verification and recovery doThree falling curves for per-step success 0.99 and 1 to 1000 steps on a log scale. With no recovery the success rate is 0.366 at 100 steps and near zero at 1000. With errors repaired with probability 0.6 it is 0.670 at 100 steps. With a verifier every 10 steps and redone segments it is 0.875 at 100 steps and 0.264 at 1000.0.000.250.500.751.001101001000number of steps n (log scale)share of tasks that succeed0.5 at n = 690.264no recovery: pⁿrecovery, ρ = 0.6checkpoint every 10 stepsHow errors compound over n steps, and what verification and recovery doThree falling curves for per-step success 0.99 and 1 to 1000 steps on a log scale. With no recovery the success rate is 0.366 at 100 steps and near zero at 1000. With errors repaired with probability 0.6 it is 0.670 at 100 steps. With a verifier every 10 steps and redone segments it is 0.875 at 100 steps and 0.264 at 1000.0.000.250.500.751.001101001000number of steps n (log scale)share of tasks that succeed0.5 at n = 690.264no recovery: pⁿrecovery, ρ = 0.6checkpoint every 10 steps
A step succeeds with probability p = 0.99. With no recovery, an n-step task succeeds with probability pⁿ: half the tasks fail by 69 steps. Repairing a noticed error (ρ = 0.6) makes a step fail for good 2.5 times less often. A verifier every 10 steps (catches a bad segment with probability 0.9, wrongly rejects a good one with 0.05, at most two redos) moves the curve furthest, and it falls too: at 1000 steps 0.264 remains, because the errors the verifier misses compound as well.

Verification moves the curve furthest, and it still falls: a thousand steps succeed with 0.264. The reason is in the third line of the display: the errors the verifier misses, (1−s)(1−d)(1 - s)(1 - d) per segment, compound like any other. More retries do not help against them; only a better verifier does. With d=0.5d = 0.5, a thousand steps succeed with 0.0040.004 whether two or five redos are allowed; with d=0.99d = 0.99 and five redos, with 0.8940.894. Long-horizon reliability is therefore a question about verifiers: can an agent check its own intermediate work, in domains without tests, with a miss rate low enough to survive hundreds of segments? The reflection note showed that a model checking itself without outside feedback often makes things worse; the verifiers that work are external, and most real tasks do not come with one.

Is the hazard constant? The step model assumes every step is equally risky. The METR data allow a test of this at the level of whole tasks. A constant hazard, a fixed chance of failing per minute of human work, gives success 2−t/h2^{-t/h} for a task of length tt: an agent with a one-hour horizon would succeed on 6.2% of four-hour tasks. Ord (2025) proposed this “half-life” reading of the time horizon. A reanalysis by Gus Hamilton, which Ord accepted in February 2026, found a better fit with a falling hazard, a Weibull curve 2−(t/h)k2^{-(t/h)^k} with shape kk around 0.60.6 for AI agents and around 0.370.37 for people (Ord, 2026). With k=0.6k = 0.6, the one-hour agent succeeds on 20.3% of four-hour tasks and 82% of 7.5-minute ones, against 91.7% under a constant hazard. Agents that survive the start of a long task are more likely to finish it, and short tasks are less safe than the constant model suggests. The two models also disagree by a factor of about 17 on the 99% horizon, which is the number that matters for delegation, so the reliability of agents at high confidence is not known even for tasks they usually solve.

Continual learning and memory#

The agents of this course do not learn from their own work after training. What they carry between tasks is text: notes, summaries and skills written into the memory of the context-and-memory note and read back by retrieval. That is useful and shallow. A person who does a job for a year gets better at it in ways that do not fit into notes; an agent with a memory file gets a longer file.

Changing the weights during deployment runs into old problems. Training on new tasks degrades old ones (catastrophic forgetting, for which elastic weight consolidation was an early remedy by penalizing changes to weights important for earlier tasks; Kirkpatrick et al., 2017). Learning from one’s own experience needs a reward for it, with every risk of the previous note: an agent that updates on its own successes learns whatever its success check rewards. And memory written by an agent that reads untrusted content is an injection that persists, the security note’s threat made permanent. Open questions: what an agent should learn from a single episode, how to store it so that it generalizes rather than accumulates, and how to keep learned behaviour checkable.

World models#

A model of the environment lets an agent try an action before taking it, the subject of Model-based reinforcement learning. Its compounding error is the same arithmetic as above: an HH-step imagined rollout is only as good as the product of its steps. Large video and interactive models trained on vast data, such as Google DeepMind’s Genie 3 (August 2025), generate explorable environments from a prompt and are proposed as training grounds for embodied agents. For language-model agents the open questions are concrete: can a model predict the result of a shell command, a click or an API call well enough to avoid an irreversible mistake; can it serve as a simulator for training without teaching the agent to exploit the simulator’s errors; and how would one measure either, when the real environment is the only ground truth.

Evaluation validity#

Evaluating agents built the statistics; the open problem is what the numbers mean. Public benchmarks leak and saturate, as SWE-bench Verified did by February 2026; graders accept shortcuts; agents game graders they can touch; the time horizon is measured on self-contained, well-specified tasks and its suite saturated in 2026. The gap that matters is between benchmark tasks and real work: tasks with vague goals, many stakeholders, long waits for feedback and no test. Measuring that well needs tasks drawn from real work, graders validated against people, held-out sets refreshed faster than training data catches up, and reporting of reliability (pass^k) and cost, not just a success rate. None of this is a solved engineering practice yet.

Cost#

An agent’s cost grows faster than its task. Each step re-reads a growing context, so an append-only loop reads a number of tokens quadratic in its length (The cost and latency of a loop); verification and retries multiply steps; reasoning models spend thousands of tokens per decision. Prompt caching, compaction and smaller models for easy steps help. The open question is economic: for which tasks does an agent cost less than the person it replaces, counting the person’s time to check its work, and how does that change as reliability rises, since checking is what low reliability makes expensive. A Pareto front of accuracy against cost is the right object; few published results report one.

Multi-agent ecosystems and economics#

Multi-agent systems treated several agents built by one team for one task. Deployed agents will meet agents built by others: buying and selling, negotiating, competing for the same resources, calling each other through protocols such as A2A. The classical theory of that note applies, with its warnings: self-interested agents can reach outcomes that are worse for all, as in the prisoner’s dilemma; markets can amplify correlated errors; and every message from another agent is untrusted content. Tomasev et al. (2025) describe the emerging “sandbox economies” of agents and argue for designing them deliberately, with mechanisms such as auctions for fair allocation and infrastructure for trust and accountability, rather than letting them form on their own. Open questions: how to identify an agent and hold its operator responsible, how to prevent collusion and runaway feedback between automated traders of any kind, and how to keep people able to understand an economy in which much of the activity is between machines.

Safety at scale#

The three previous notes each end with a problem that grows with capability. Injection cannot be solved inside the model, only contained around it, and every new tool widens the surface. Reward hacking becomes harder to see as agents become better at finding unintended solutions, and training against monitors teaches concealment. Oversight depends on people who can check the work, and the work is getting longer and more technical. As agents are given more autonomy, more access and longer tasks, the questions that matter are whether control protocols keep working against stronger untrusted models, whether reasoning stays readable, whether dangerous-capability evaluations elicit what a model can really do, and whether the institutions that deploy agents can respond as fast as capabilities change. These are research problems and governance problems at once.

What the course did not cover#

The course followed one line, from the classical agent to language-model agents, and left out large fields that share its vocabulary.

  • Embodied and robotic agents. Agents with bodies face continuous control, real-time constraints and costly real-world data. Start with Levine’s CS285 for deep RL in control, and with surveys of robot learning.
  • Vision–language–action models. Models that map images and instructions directly to robot actions: RT-2 (Brohan et al., 2023) trained a vision–language model to output actions as tokens; OpenVLA (Kim et al., 2024) is an open 7-billion-parameter model of this kind; π0 (Black et al., 2024) adds a flow-matching action head for dexterous control.
  • Multi-agent reinforcement learning. Learning when several agents learn at once, so that the environment is non-stationary from each one’s view: equilibria, cooperation, self-play beyond the two-player games of this course. The textbook by Albrecht, Christianos and Schäfer (2024) is a full treatment.
  • The theory of RL beyond what the course needed: regret bounds, sample complexity, off-policy evaluation. Sutton and Barto and the courses listed in the first note are the next step.

What changed#

the agent of a benchmarkthe agent of an open problem
task lengthminutes to hours, self-containeddays, with vague goals and late feedback
reliabilitya success ratepnp^n and what changes its exponent: recovery and verifiers
learningfixed after trainingcontinual, from its own experience, with its risks
environmentgiven and resettablepredicted by a world model before acting
measurementa public benchmarktasks from real work, validated graders, reliability and cost
other agentsa team built by one designeran ecosystem of agents built by others
safetydefences and monitors per systemcontainment and oversight that keep up with capability

Limitations#

  • The step model is a caricature. Real steps differ in difficulty, errors are correlated, and some errors are harmless; the formulas show what compounds, not how fast it does for a given agent.
  • The hazard analyses rest on one task suite. The constant and Weibull readings were fitted to METR’s tasks; other domains may differ.
  • Open problems are dated. This list reflects October 2026; some items will be solved and others will appear, and the ones that look hardest may not be.
  • Breadth over depth. Each problem here deserves its own course; the note names them and points to where they start.

What you should remember#

  • A task of nn independent steps succeeds with pnp^n; at p=0.99p = 0.99 half of all tasks fail by 69 steps. Recovery turns ee into e(1−ρ)e(1 - \rho); verification at checkpoints does more, but the errors the verifier misses still compound, so long-horizon reliability is a question of verifiers.
  • Success against task length is better fitted by a falling hazard (Weibull shape around 0.6) than a constant one; the two disagree most at the high-reliability horizons that delegation needs.
  • Agents remember through text, not through learning; continual learning brings back forgetting, reward hacking and persistent injection.
  • World models, valid evaluations, cost, ecosystems of agents and safety at scale are open, and each depends on finding a check where none is given.
  • The course left out embodied agents, vision–language–action models and multi-agent RL; start from CS285, RT-2, OpenVLA, π0 and the MARL textbook.

The course in one paragraph#

Figure

The course as one chain

The course as one chainSeven boxes joined by arrows: agents and environments, reinforcement learning, the language model as a policy, memory and planning, agents at work, training agents, evaluation and safety. Under each name, what that section adds.agentsknown world: search, MDPs1RLlearn from reward2LLM as a policyreason, call tools, loop3memory and planningbeyond one context window4agents at workcode, web, research, teams5trainingRLHF, GRPO, agentic RL6evaluation, safetymeasure, defend, oversee7The course as one chainSeven boxes joined by arrows: agents and environments, reinforcement learning, the language model as a policy, memory and planning, agents at work, training agents, evaluation and safety. Under each name, what that section adds.agentsknown world: search, MDPs1RLlearn from reward2LLM as a policyreason, call tools, loop3memory and planningbeyond one context window4agents at workcode, web, research, teams5trainingRLHF, GRPO, agentic RL6evaluation, safetymeasure, defend, oversee7
Every section keeps the agent–environment loop of the first note and adds what the earlier ones could not do: an unknown world, text as actions, long tasks, real environments, training on rewards, and at the end ways to know whether the agent works and is safe.

An agent is a program that perceives and acts in a loop, judged by a performance measure on the states it brings about; when the world is known it plans by search, and when outcomes are random it solves a Markov decision process, whose Bellman equations every later method approximates. When the world is unknown, reinforcement learning estimates the same values and policies from experience, from tabular Q-learning to deep Q-networks, policy gradients with PPO, and learned world models for planning. A pretrained, instruction-tuned language model supplies a policy with a broad prior over text; reading its output as actions, letting it reason in a chain of thought, call tools through schemas and observe the results in a ReAct loop turns it into an agent, and memory, planning, reflection and fixed workflows let that agent work beyond one context window, connected to tools by protocols such as MCP. In repositories, browsers, desktops and the open web, the same loop becomes coding, computer-use, research and multi-agent systems, each limited less by the model than by what it can see, check and undo. Reinforcement learning then returns as the way these agents are trained, from RLHF and GRPO with verifiable rewards to reasoning models and multi-turn agentic RL. And because every agent optimizes a measure in an environment that may be adversarial, it must be evaluated with statistics over tasks and trials, defended by isolation rather than trust, and overseen by people and monitors who check what it does against what was meant.

Code#

The baseline pnp^n and the number of steps at which half of the tasks fail, recovery and verification at checkpoints computed exactly and checked by simulation with their expected step counts, what limits verification, and the constant-hazard and Weibull readings of a time horizon. NumPy only; seeds are fixed, and simulated numbers can differ slightly across platforms and library versions. The script runs in about a second.

The steps here are coin flips with fixed probabilities; in a real agent the probabilities differ from step to step, errors are correlated, and whether an error is noticed depends on the observation. The arithmetic of what compounds is the same.

import numpy as np

# 1. independent steps: a task of n steps succeeds only if every step does
for p in (0.99, 0.95, 0.90):
    print(f'p={p}:', ' '.join(f'n={n}: {p ** n:.3f}' for n in (10, 50, 100, 500)), f'| 50% at n = {np.log(0.5) / np.log(p):.1f}')
# p=0.99: n=10: 0.904 n=50: 0.605 n=100: 0.366 n=500: 0.007 | 50% at n = 69.0
# p=0.95: n=10: 0.599 n=50: 0.077 n=100: 0.006 n=500: 0.000 | 50% at n = 13.5
# p=0.9: n=10: 0.349 n=50: 0.005 n=100: 0.000 n=500: 0.000 | 50% at n = 6.6

# 2. recovery: an error (probability e = 1 - p) is noticed and repaired with probability rho, at one extra step
def recover(p, rho, n): return (1 - (1 - p) * (1 - rho)) ** n

# 3. verification at checkpoints: every m steps a verifier checks the segment. It catches a bad segment with
#    probability d and rejects a good one with probability f; a rejected segment is redone, at most r times.
def checkpoint(p, n, m, d, f, r):
    s = p ** m                                       # a segment of m steps is right
    again = s * f + (1 - s) * d                      # the attempt is rejected and redone
    seg = s * (1 - f) * sum(again ** j for j in range(r + 1))
    per_seg = m * sum(again ** j for j in range(r + 1))  # attempt j + 1 runs if the first j were rejected
    K = n // m                                       # segment i runs only if the i before it succeeded
    return seg ** K, per_seg * (1 - seg ** K) / (1 - seg)

def simulate(p, n, mode, rng, rho=0.6, m=10, d=0.9, f=0.05, r=2, trials=20000):
    ok, cost = 0, 0
    for _ in range(trials):
        steps, alive = 0, True
        if mode == 'recover':
            for _ in range(n):
                steps += 1
                if rng.random() > p:                 # an error
                    if rng.random() < rho: steps += 1    # noticed and repaired
                    else: alive = False; break
        else:
            for _ in range(n // m):
                for attempt in range(r + 1):
                    steps += m
                    good = rng.random() < p ** m
                    rejected = rng.random() < (f if good else d)
                    if not rejected: break
                if rejected or not good: alive = False; break
        ok += alive; cost += steps
    return ok / trials, cost / trials
rng = np.random.default_rng(0)
p, n = 0.99, 100
print(f'p={p}, n={n}: none {p ** n:.3f}')
print(f'  recovery rho=0.6:        exact {recover(p, 0.6, n):.3f}   simulated {simulate(p, n, "recover", rng)[0]:.3f}')
ex, steps = checkpoint(p, n, 10, 0.9, 0.05, 2); sim, sim_steps = simulate(p, n, 'checkpoint', rng)
print(f'  checkpoints m=10, d=0.9, f=0.05, r=2: exact {ex:.3f} ({steps:.0f} steps)   simulated {sim:.3f} ({sim_steps:.0f} steps)')
for n_ in (10, 100, 300, 1000):
    print(f'  n={n_:4d}: none {p ** n_:.3f}  recovery {recover(p, 0.6, n_):.3f}  checkpoints {checkpoint(p, n_, 10, 0.9, 0.05, 2)[0]:.3f}')
# p=0.99, n=100: none 0.366
#   recovery rho=0.6:        exact 0.670   simulated 0.664
#   checkpoints m=10, d=0.9, f=0.05, r=2: exact 0.875 (108 steps)   simulated 0.879 (108 steps)
#   n=  10: none 0.904  recovery 0.961  checkpoints 0.987
#   n= 100: none 0.366  recovery 0.670  checkpoints 0.875
#   n= 300: none 0.049  recovery 0.300  checkpoints 0.670
#   n=1000: none 0.000  recovery 0.018  checkpoints 0.264

# 4. what limits the checkpoints: undetected bad segments, (1 - p^m)(1 - d), and the retry cap
for d in (0.5, 0.9, 0.99):
    print(f'd={d}: n=1000 -> {checkpoint(p, 1000, 10, d, 0.05, 2)[0]:.3f}', f' with r=5 -> {checkpoint(p, 1000, 10, d, 0.05, 5)[0]:.3f}')
# d=0.5: n=1000 -> 0.004  with r=5 -> 0.004
# d=0.9: n=1000 -> 0.264  with r=5 -> 0.330
# d=0.99: n=1000 -> 0.680  with r=5 -> 0.894

# 5. time horizons: a constant hazard gives P(t) = 2^(-t/h); a falling hazard (Weibull, shape k < 1) gives 2^(-(t/h)^k)
h = 60.0
for t in (7.5, 60, 240, 960):
    print(f't={t:5.1f} min: constant hazard {2 ** (-t / h):.3f}   Weibull k=0.6 {2 ** (-(t / h) ** 0.6):.3f}')
# t=  7.5 min: constant hazard 0.917   Weibull k=0.6 0.820
# t= 60.0 min: constant hazard 0.500   Weibull k=0.6 0.500
# t=240.0 min: constant hazard 0.062   Weibull k=0.6 0.203
# t=960.0 min: constant hazard 0.000   Weibull k=0.6 0.026

References#