.eval.ts, in three steps:
- Put the starting project into the Sandbox; this is the Fixture.
- Give the Agent a specific task.
- Accept the work with file contents, command results, and diffs, and hand open-ended quality to the Judge.
Recommended directory layout
Keep the starting project and the evals apart. The Agent can only see what you upload into the Sandbox; eval code and verification materials stay outside:workspaces/ holds the starting projects the Agent can see. The .eval.ts decides when to upload, what task to send, and how to check the result. experiments/ chooses the Agent and model, and whether to load a Skill or plugin.
Put the starting project into the Sandbox
For the Agent to work in a real project, the first step is uploading the project into the Sandbox:t.sandbox.writeText(), which suits small tasks or safety check scripts.
When fileChanged fails, first use pnpm exec niceeval show @<locator> --diff to see which files the Agent actually changed.
Write the task prompt
The prompt should read like a real ticket: state the goal and constraints clearly, but do not give away the verification answer.Verify files and code
After the Agent runs, read the files it changed and check that the key code is in place:t.sandbox.fileChanged() only looks at the Agent’s changes during t.send() to decide whether it changed the target file. Files you uploaded or wrote yourself do not count. For the recording rules, see Sandbox Agent · Make file changes recordable.
Run project tests or check scripts
Text matching only shows what the code looks like; running it shows whether it is right. For Coding Agent tasks, real commands are usually more reliable. The example below writes a check script after the Agent finishes and runs it:commandSucceeded() fails, use pnpm exec niceeval show @<locator> to see the command’s exit code and output.
Use Experiments as control groups
To know whether a Skill or plugin helps, run the same tasks with and without it. The conditions go in the Experiment: it chooses the Agent and fixes the run configuration. The first command-line argument selects the Experiment, and later arguments filter evals by ID prefix. Do not put Agent names, plugin names, or URLs in command-line arguments.experiments/baseline.ts: the Agent with no extra configuration.experiments/with-skill.ts: the same Agent, writingCLAUDE.mdwith a lifecycle Hook or a Plugin.- Both groups use the same evals, the same model, the same
attempts, and the same budget.
pnpm exec niceeval show --experiment baseline --experiment with-skill, or view them in the browser with pnpm exec niceeval view. When the two groups score almost the same, first confirm that CLAUDE.md really exists in the with-skill Sandbox.
When to use a Fixture
- The Agent needs to modify real files.
- You need to run the project’s tests, build, or lint.
- You need to compare code changes.
- You are evaluating a Coding Agent such as Claude Code or Codex.
- You want to compare whether a Skill, plugin, or Hook improves results on real tasks.