[MODEL] Subagent deleted other subagents' mktemp dirs with a glob rm in the shared session scratchpad
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start by reading the subagent scratchpad setup and cleanup paths; the issue names no files or tests, so locate where shared scratchpads are created and where temporary directories are removed. Check how cleanup is scoped when subagents run in parallel. Done when one subagent's cleanup cannot remove another's temporary directory, with coverage for the shared-session case.
Written by the indexing model from the issue text.
Description
Type of Behavior Issue
Subagent behaved unexpectedly
What You Asked Claude to Do
Four coding subagents were running in parallel in one session. Each one had to build and run its own script, and each made temporary directories with mktemp -d inside the shared session scratchpad.
What Claude Actually Did
One subagent cleaned up its own temporary mirror with a name glob over the whole shared scratchpad:
find <scratchpad> -maxdepth 1 -type d -name 'tmp*' -exec rm -r {} +
This deleted about 70 tmp.XXXXXXXXXX directories that the other subagents had created. Named files were not touched.
Expected Behavior
The subagent should delete only its own directory, by its explicit path. Alternatively, the harness could give each subagent its own scratchpad subdirectory, so that one agent's cleanup cannot reach another's files.
Permission Mode
Not recorded.
Can You Reproduce This?
No, only happened once
Steps to Reproduce
- Run several subagents that share one session scratchpad and create directories there with
mktemp -d. - Let one of them clean up with a glob such as
-name 'tmp*'over the shared directory.
Claude Model
Opus 5.5 (claude-opus-5-5), Claude Code 2.1.289, Linux x64
Impact
Medium - Extra work to undo changes (other agents' intermediate work was lost)
- Dominant language
- TypeScript
- Stars
- 154k
- Forks
- 26.1k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 11
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 area:security area:skills bug has repro
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anthropics/claude-code#105911 ·
Maintainers usually reply within 1 day
-
area:hooks documentation enhancement
Difficulty 1/5 Under an hour Newbie friendliness 75/100
anthropics/claude-code#105799 ·
Maintainers usually reply within 1 day
-
area:desktop bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
anthropics/claude-code#105784 · 1 comment ·
Maintainers usually reply within 1 day
-
area:networking bug platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
anthropics/claude-code#105756 ·
Maintainers usually reply within 1 day
-
area:packaging enhancement platform:linux
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anthropics/claude-code#105704 ·
Maintainers usually reply within 1 day
All issues in anthropics/claude-code
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
dev-five-git/devup-ui#879 ·
Maintainers usually reply within 11 days
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fission-AI/OpenSpec#2165 ·
Maintainers usually reply within 1 day
-
🐞 bug 🧐 unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Tencent/tdesign-vue-next#7032 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anomalyco/opencode#60174 · 1 comment ·
Maintainers usually reply within 1 day