Test plugins with evals changedplugin-evals
Nearest release: v2.1.332, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 25 Nov 2026 00:37 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 25 Nov 2026 01:07 UTC.
Upstream edited
Recorded here
Lines+32added
Lines−6removed
From line
195
where the diff opens
First seen
11 Sep 2026
this site's first read of the page
Recorded edits24to this page, all time
#### Pre-approve reads from another path ### Remove a built-in tool from runs
The whole hunk
from line 195, old and new numbered
/
from line 195
195195
196196### Set run limits and tools in prompt.md
197197
198Set a case's `max_turns`, `timeout_seconds`, `model`, `tags`, and the `allowed_tools` it may use in `prompt.md` frontmatter; the [prompt.md frontmatter](#prompt-md-fields) reference lists every field and its default.
198Set a case's `max_turns`, `timeout_seconds`, `model`, `tags`, and `allowed_tools` in `prompt.md` frontmatter. For the other fields and the defaults, see the [prompt.md frontmatter](#prompt-md-fields) reference.
199199
200200Claude receives the body exactly as you wrote it. `@path` mentions in it aren't expanded into file attachments, so if Claude needs to read a file, grant a tool for it in `allowed_tools`.
201201
from line 334
334334
335335Add `--case <glob>` to filter by case name and `--tag <tag>` to keep cases with any of the given tags.
336336
337Put the target before `--tag`, `--allow-tools`, and `--json`. The first two take a list and `--json` takes an optional path, so each of them reads a target that follows as its own value.
337Put the target before `--tag`, `--allow-tools`, `--disallow-tools`, and `--json`. The first three take a list and `--json` takes an optional path, so each of them reads a target that follows as its own value.
338338
339339### Grant tools
340340
341341Runs never stop to ask for permission. Built-in tools that need a grant you didn't give, such as `Bash`, `Write`, `Edit`, `WebFetch`, and `WebSearch`, are removed from the session, so Claude can't call them at all.
342342
343A run allows only the read-only tools the case lists in `allowed_tools`, from `Read`, `Glob`, `Grep`, `NotebookRead`, `Skill`, `AskUserQuestion`, `Agent`, `TodoWrite`, and the task tools `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, and `TaskStop`, plus whatever you grant with `--allow-tools`. That grant applies to every case in the run. To let cases use `Bash`, `Write`, `Edit`, `WebFetch`, or `WebSearch`, grant them yourself:
343A run pre-approves the read-only tools the case lists in `allowed_tools`, from `Read`, `Glob`, `Grep`, `NotebookRead`, `Skill`, `AskUserQuestion`, `Agent`, `TodoWrite`, and the task tools `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, and `TaskStop`, plus whatever you grant with `--allow-tools`. That grant applies to every case in the run.
344344
345To let cases use `Bash`, `Write`, `Edit`, `WebFetch`, or `WebSearch`, grant them with `--allow-tools`:
346
345347```bash theme={null}
346348claude plugin eval . --allow-tools Write Edit "Bash(npm test *)"
347349```
from line 350
348350
349351When a case asked for a tool you didn't grant, the progress output lists it as `not granted`. Tools on a [mocked](#mock-mcp-servers) MCP server need no grant. Tools on a real plugin MCP server need both the server started, with `--allow-real-servers` or `--mocks off`, and a grant by name, such as `--allow-tools "mcp__plugin_my-plugin_github__*"`; a plugin's MCP tools are named `mcp__plugin_<plugin>_<server>__<tool>`.
350352
353#### Pre-approve reads from another path
354
355To pre-approve reads under a folder such as `/data`, grant a [`Read` rule](https://code.claude.com/docs/en/permissions#read-and-edit) with a leading `//`, as in `--allow-tools "Read(//data/**)"`. On native Windows, the same grant for `C:\data` is `Read(//c/data/**)`. Listing `Read`, `Glob`, or `Grep` alone doesn't pre-approve every path on your machine.
356
351357#### Shell grants need a sandbox
352358
353359When you grant `Bash` in any form, every command runs under Claude Code's [OS-level sandbox](https://code.claude.com/docs/en/sandboxing.md). Writes are confined to the run's workspace, your home directory and Claude Code configuration are unreadable, and network access is limited to domains you grant with `--allow-tools "WebFetch(domain:example.com)"`. If you grant Bash or PowerShell on a machine with no sandbox backend, Claude Code refuses each run rather than running it unconfined, and the case shows a run error and usually scores 0. Native Windows has no backend, so run shell-granting suites under WSL2; on Linux, install `bubblewrap` and `socat` first. See the [sandboxing prerequisites](https://code.claude.com/docs/en/sandboxing.md).
from line 369
363369
364370Ask your administrator whether that setting can change for your machine, or drop the shell grant from that run.
365371
372### Remove a built-in tool from runs
373
374To remove a built-in tool from every case, pass its [exact name](https://code.claude.com/docs/en/tools-reference.md) to `--disallow-tools`. For one case, list the name in that case's [`disallowed_tools`](#prompt-md-fields) field. Requires Claude Code v2.1.299 or later.
375
376If you only omit `Agent` from `allowed_tools`, Claude can still call it.
377
378To remove `Agent` and `TaskStop` from every case, run this in your shell:
379
380```bash theme={null}
381claude plugin eval . --disallow-tools Agent TaskStop
382```
383
384The output lists both tools after `Removed from Claude's tools in every case`.
385
366386### Command options
367387
368388This table covers the options for run count, models, scoring, cost, tool grants, mocks, and output. Run `claude plugin eval --help` for the complete list, which also includes `--case`, `--tag`, `--eval-dir`, `--no-scaffold`, `--report`, and `--verbose`.
from line 397
377397| `--threshold <0..1>` | `1.0` | A case passes when its with-arm score is at least this. Any case below it makes the command exit 1 |
378398| `--max-cost-usd <usd>` | No ceiling | A ceiling on the run's list-price cost estimate, not on plan usage. Checked before each run starts. Once spent, nothing further starts; runs that already started finish, so spend can pass the ceiling by those runs. If any run is left unstarted, the command exits 2 with partial results |
379399| `--allow-tools <tools...>` | None | Grant tools beyond the read-only set. See [Grant tools](#grant-tools) |
400| `--disallow-tools <tools...>` | None | Remove built-in tools from every case. See [Remove a built-in tool from runs](#disallow-tools) |
380401| `--scaffold` | Off | Run each case's [`scaffold_script`](#add-setup-or-history-with-case-yaml) |
381402| `--trust-plugin` | Off | Skip the first-run trust prompt for a plugin whose code and suite you'd run yourself. Pass it in CI so the job is never refused by or left waiting at the prompt. See [What a run can access](#security) |
382403| `--mocks <mode>` | `record` | `record` answers MCP tool calls from [mocks](#mock-mcp-servers), doesn't start the plugin's real servers, and saves agent-mock answers for replay. `off` ignores mocks and starts the plugin's real MCP servers |
from line 558
537558| `model` | The child session's default | Model for the agent under test. `--model` overrides it |
538559| `max_turns` | `10` | Turn cap, up to 200. Hitting it is recorded as a run error and usually lowers the score, so set it generously |
539560| `timeout_seconds` | `300` | Wall-clock cap per run, up to 3600 |
540| `allowed_tools` | `[]` | Tools the case wants, such as `[Read, Glob, Grep, Skill]`. Read-only tools are granted when listed here; for anything else, see [Grant tools](#grant-tools) |
561| `allowed_tools` | `[]` | Tools the case wants, such as `[Read, Glob, Grep, Skill]`. See [Grant tools](#grant-tools) |
562| `disallowed_tools` | | Exact built-in tool names to [remove from this case](#disallow-tools), such as `[Agent, TaskStop]` |
541563| `append_system_prompt` | | Text appended to the child session's system prompt |
542564| `env` | `{}` | Extra environment variables for the child session. Keys must match `EVAL_[A-Z0-9_]*`; any other key fails the run. The run inherits only an allowlist from your shell: basics such as `PATH` and locale, proxy and certificate settings, the variables that select and authenticate your model provider, most `ANTHROPIC_*` and `CLAUDE_CODE_*` configuration, and `EVAL_*`. To pass the plugin anything else, such as a toolchain setting, export it as an `EVAL_*` variable |
543565
544566### case.yaml fields
545567
546`case.yaml` is an alternative or companion to `prompt.md`: it describes a case in YAML and adds the fields that point at other files. It requires `schema_version: "1.1"` and `name`. The `prompt.md` fields `description`, `tags`, `plugins`, `runs`, and `expected_outcome` go at the top level; `model`, `max_turns`, `timeout_seconds`, `allowed_tools`, `append_system_prompt`, and `env` go under `execution:`. When both files exist, `prompt.md` frontmatter overrides the matching `case.yaml` fields, the `prompt.md` body is the prompt, and `graders/*.md` are added after any graders listed in `case.yaml`.
568`case.yaml` is an alternative or companion to `prompt.md`: it describes a case in YAML and adds the fields that point at other files. It requires `schema_version: "1.1"` and `name`. The `prompt.md` fields `description`, `tags`, `plugins`, `runs`, and `expected_outcome` go at the top level; `model`, `max_turns`, `timeout_seconds`, `allowed_tools`, `disallowed_tools`, `append_system_prompt`, and `env` go under `execution:`.
547569
570When both files exist, `prompt.md` frontmatter overrides the matching `case.yaml` fields other than `disallowed_tools`, where the two lists combine. The `prompt.md` body is the prompt, and `graders/*.md` are added after any graders listed in `case.yaml`.
571
548572These fields exist only in `case.yaml`:
549573
550574| Field | Purpose |
from line 701
677701
678702The error is expected, since `Δ` compares your plugin's runs against the baseline. In the JSON result, the baseline runs are under `cases[].arms.without`.
679703
680In runs with your plugin loaded, a case that lists `Agent` in `allowed_tools` can dispatch one of your plugin's agents by its namespaced name, such as `my-plugin:code-reviewer` for the `code-reviewer` agent in a plugin named `my-plugin`. To skip the baseline runs, pass `--ablation none`.
704> [!NOTE]
705>
706> In runs with your plugin loaded, Claude can dispatch one of your plugin's agents by its namespaced name, such as `my-plugin:code-reviewer` for the `code-reviewer` agent in a plugin named `my-plugin`. To skip the baseline runs, pass `--ablation none`.
681707
682708### Everything scores zero although the right files were produced
683709
No line in this hunk matches that.