An agent task is an initial state and action contract, not only a prompt
Specify environment snapshots, observations, tool effects, budgets, and reset boundaries so comparisons concern reproducible executions rather than inherited side effects.
On this page
The question for today
What you’ll understand
- Define a task using state, observations, action semantics, grading, and budgets.
- Separate tool acknowledgments from committed effects under retries and timeouts.
- Count isolated trials and preserve task-level cohort identity across environment versions.
A natural-language request is only one part of an agent evaluation. The same instruction can be easy, impossible, or already completed depending on account permissions, files, database contents, interface version, and previous runs. A credible task suite specifies these conditions together with the actions and observations available to the agent. Preserve the initial-state and effect contract so a measured success reflects one intended execution rather than a lucky inherited state or a plausible description of work that never happened.
Bind the instruction to a reproducible execution environment
Identify task instances and families, then record the initial data snapshot, application and dependency versions, identities and permissions, clock assumptions, observation interface, and allowed external resources. A screenshot agent and an agent receiving structured database rows do not solve the same observation problem even when the final goal is similar. WebArena and OSWorld illustrate task-specific environment setup and execution-based checking in web and desktop settings. Their realism and reproducibility are useful properties within their declared domains, not proof that one suite represents every deployment environment.
Specify which state is reset between attempts and which shared resources remain. Files, cookies, service caches, queued jobs, search indexes, and background workers can survive a superficial process restart. Validate setup preconditions before running the policy and record setup failures separately under a predeclared reporting rule. Seeds help reproduce some random choices but do not identify changing remote services or every nondeterministic execution. Retain immutable snapshot and configuration identities rather than relying on a mutable image tag or the word latest in an evaluation report.
Action semantics determine whether a retry changes the task
A tool call can fail before an effect, succeed with an acknowledged effect, or commit an effect while its response is lost. Record this ambiguity in the environment contract. An error string alone does not establish that no payment, file update, or message occurred. A retry with an enforced idempotency key can differ fundamentally from a second unkeyed action. The evaluator should inspect the authoritative effect boundary rather than count confident completion text or assume all repeated calls are harmless. Use controlled fixtures for such tests so evaluation does not perform unintended real external actions.
Observation freshness also matters. An action may update a database before a search page refreshes, or an asynchronous job may complete after the agent stops. Define the completion boundary, waiting policy, and maximum observation delay. A task can require one final state, a sequence of allowed states, or a durable artifact that survives restart. Those requirements belong in the grading specification. If the environment changes between systems, report that as a changed experimental condition instead of attributing every difference to the agent policy.
Keep trial accounting and reset evidence with the results
Maintain task ID, environment version, agent version, attempt ID, setup evidence, action budget, termination reason, and outcome artifacts for every scheduled execution. Do not let one attempt's completed goal make the next attempt trivially successful. Counterbalance or isolate conditions when ordering can affect service state. The SWE-bench evaluation guide illustrates why harness execution, graded outcomes, missing predictions, and infrastructure failures are different result categories. A process finishing without a crash is not the same event as an agent solving its task.
The cache lab isolates surviving state between accesses. Reset, explicitly set BOTH capacity C=4 and stride s=4, predict twelve hits at the initial sixteen requests, then Play or Step. Reset and re-set BOTH C=3 and s=4; predict zero hits. N=min(4096,16+floor(2 t)); edits retain t and recompute from empty. The toy has no task suite, files, accounts, or environment reset. Its remembered identities illustrate why prior state affects observations, while actual evaluation isolation requires inspecting and restoring the real state boundaries.
Work it through
Count isolated starts and distinguish a retry from a new effect
A fictional suite has ten tasks, three attempts per task, and two agent configurations. Each attempt must start from its specified snapshot. In one sandbox payment task, initial balance is one hundred units and one intended debit is ten; a response is lost after commitment and the agent retries.
The comparison schedules 10×3×2=60 attempts, each requiring validated initial state. Thirty task-attempt labels per agent do not imply that a single shared mutable account is safe to reuse.
With a correctly enforced shared idempotency key for the two calls, one debit commits and the balance is 100−10=90. The lost acknowledgment changes knowledge, not the committed amount.
With two effective unkeyed debits, balance is 100−10−10=80 and the one-debit goal fails. Grade the authoritative effect and restore the fixture before the next attempt rather than interpreting the final completion message as proof.
Controlled starts and explicit action semantics make trial outcomes attributable to the intended execution.
The living notebook
Explore the model
Interactive lab · cache
Remembered state can change the next observed result
For EACH run Reset, set BOTH C and s, predict, then Play or Step. At t=0/N=16, (4,4) has twelve hits and (3,4) has zero. N=min(4096,16+floor(2 t)); edits retain t/recompute from empty. This LRU trace has no agent task, authoritative effects, environment snapshots, or reset verification.
- Hits / requests
- 0 / 16
- Hit rate
- 0%
- Address-stream period
- 16 addresses
A fully associative LRU cache starts empty and requests address (i·s) mod 16. Hits move an address to the newest position; misses evict the oldest when full. Playback starts with 16 requests and adds two per second, capped at 4096 explicitly simulated requests. This toy stream is not a processor-cache benchmark. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA reproducible agent trial requires a specified and verified initial state, not merely the same instruction text.
Pause & reason
Check your understanding
Your turn
Try it yourself
Twelve task instances are run four times each under two environment snapshots for one policy. How many attempts are scheduled? Why should a higher success count on the second snapshot not automatically be described as improved agent capability?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Treat environment version as an experimental condition and keep the agent policy fixed.
Compare with the solution
There are 12×4×2=96 scheduled attempts. The environment change can alter preconditions, observations, difficulty, or grading, so different success counts do not isolate a policy improvement. Report the snapshot-specific results and preserve comparable reset evidence for each attempt.
Keep the idea
Take it with you
- Task identity includes initial state, observations, action effects, grading, budgets, and versions.
- Timeouts and acknowledgments do not alone determine committed side effects.
- Trial isolation and complete accounting prevent inherited state from masquerading as capability.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.