.eval.ts file that explicitly prepares the Sandbox workspace, sends the task, and asserts on the result.
See coding-agent-skill (a separate repository) for a runnable reference.
Recommended directory structure
workspaces/ holds the starting project the Agent can see. .eval.ts controls when the workspace is uploaded, the task prompt, and what to verify. experiments/ selects the Agent, the model, and whether to inject a Skill or plugin.
Prepare the workspace
Inside the eval, upload the starting project to the Sandbox:t.sandbox.writeText() to add seed files within a single eval — a good fit for small tasks or security probes.
Write the task prompt
The prompt should read like a real work order. Describe the goal and constraints, but do not leak the verification answer.Verify files and code
t.sandbox.fileChanged() is a scoped assertion: after the run ends, it uses the agent-attributed diff to determine whether the target file actually changed.
Run project tests or probe scripts
For coding-agent tasks, real commands are usually more reliable than text matching:Use experiments for baselines
Do not put Agent names, plugin names, or URLs into positionals. The Experiment selects the Agent and pins the run configuration; the CLI’s eval positionals only filter eval IDs.experiments/baseline.ts: a plain agent.experiments/with-skill.ts: the same agent plus a setup hook that writesCLAUDE.md.- Both groups use the same eval set, model, attempt count, and budget.
When to use Sandbox Fixture
- The agent needs to modify real files.
- You need to run the project’s tests, build, or lint.
- You need to compare diffs.
- You are evaluating a coding agent such as Claude Code or Codex.
- You are comparing whether a Skill, plugin, or Hook improves real tasks.