plugin eval: an Agent call with `isolation: "worktree"` is refused, and the plugin-evals page doesn't say so
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, typescript
- Domain
- cli, developer-experience
Research direction
Start with the plugin-evals documentation and its § How runs are isolated section, then check claude plugin eval --help to confirm the current behavior. The issue gives a clear close condition: either worktree isolation works in eval runs or the documentation explicitly says it is refused. Update the documentation to match the behavior you verify.
Written by the indexing model from the issue text.
Description
What happens
In a claude plugin eval run, an Agent tool call that sets isolation: "worktree" fails with:
Cannot create agent worktree: worktree isolation is unavailable in this session (plugin evaluation harness)
The same call succeeds in a claude -p session in a repository of the same shape: the subagent runs in its own worktree under .claude/worktrees/.
Why it matters
A skill that dispatches a subagent into its own worktree, so the subagent can edit and run the project's code without writing the user's checkout, can't have that path measured with claude plugin eval: every case that reaches the dispatch scores the refusal instead. The plugin-evals page's § How runs are isolated lists what a run turns off, such as the Artifact tool, and doesn't mention worktree isolation, and claude plugin eval --help names no option for it, so a case author finds out from a failed run.
Reproducer
A plugin with nothing but a manifest and one case:
.claude-plugin/plugin.json
{
"name": "repro-isolation",
"version": "0.0.1",
"description": "Reproducer: an Agent call with isolation worktree inside claude plugin eval."
}
evals/isolated-subagent/prompt.md
---
expected_outcome: "The subagent runs in its own worktree and replies with the output of `git rev-parse --show-toplevel`."
max_turns: 10
allowed_tools: [Agent, Bash, Read]
---
The working directory is a git repository with one commit. Use the Agent tool once: dispatch a general-purpose subagent with `isolation: "worktree"`, asking it to run `git rev-parse --show-toplevel` and reply with the output. Then report the subagent's reply, or the exact error the Agent tool returned.
evals/isolated-subagent/case.yaml
schema_version: "1.1"
name: isolated-subagent
context:
scaffold_script: scaffold.sh
evals/isolated-subagent/scaffold.sh
#!/usr/bin/env bash
set -euo pipefail
export GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1
git init --quiet --initial-branch=main .
echo hello > README.md
git add README.md
git -c user.name=Example -c [email protected] commit --quiet -m "One file"
evals/isolated-subagent/graders/isolated.md
---
type: tool_used
tool: Agent
input_match: '"isolation"\s*:\s*"worktree"'
---
Run claude plugin eval . --scaffold --allow-tools Bash --runs 1 --keep-temp. The session makes the one Agent call, gets the error above as its tool result, and reports it; the subagent never starts.
For comparison, build the same repository with scaffold.sh in an empty directory and run the prompt's body there with claude -p "<prompt>" --allowedTools Agent Bash Read --permission-mode dontAsk. The subagent runs, and git rev-parse --show-toplevel prints <repository>/.claude/worktrees/agent-<id>.
Claude Code 2.1.319, macOS 26.5.1.
Suggested close condition
Either an Agent call with isolation: "worktree" works in an eval run (its worktree inside the run's workspace, where the run's sandbox already lets Bash write), or plugin-evals § How runs are isolated says such a call is refused, as it says the Artifact tool is off.
- Dominant language
- TypeScript
- Stars
- 154k
- Forks
- 25.6k
- Avg merge
- 12h 27m
- Merged PRs (30d)
- 4
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:plugins bug has repro platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anthropics/claude-code#108218 ·
-
area:tui bug keybindings platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
anthropics/claude-code#108201 ·
-
area:docs documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#108192 · 1 comment ·
-
area:api area:docs documentation enhancement platform:macos
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
anthropics/claude-code#108146 ·
-
area:chrome area:permissions bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
anthropics/claude-code#108139 ·
All issues in anthropics/claude-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
earendil-works/pi-claude-code#36 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Resources: New work of jabodetabekPossibly taken @rmt-svc claimed this today. Openresources
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
railmapgen/rmp-gallery#4167 ·
Maintainers usually reply within 2 days
-
documentation p1
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
microsoft/monaco-editor#5577 ·
Maintainers usually reply within 1 day