# Explore sub-agents silently cannot complete file-writing tasks (e.g. write to \`/tmp\`)

**URL:** <https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369>\
**Category:** Bug Reports\
**Tags:** sandbox, subagents\
**Created:** [June 3, 2026, 9:40pm UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369 "2026-06-03T21:40:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomO](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TomO](https://forum.cursor.com/u/TomO)\
**Post date:** [June 3, 2026, 9:40pm UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369/1 "2026-06-03T21:40:37Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

When a parent agent spawns a sub-agent in read-only mode (e.g. the `explore` subagent type, or `Task` with `readonly: true`), the sub-agent is blocked from **all** filesystem writes — including writes to `/tmp`. This breaks a very common orchestration pattern: “do X and write your findings to `/tmp/<file>.md` so the parent can read them.” The sub-agent cannot comply, so it silently falls back to dumping its full output inline in its final message, and the parent’s follow-up step (reading the file) fails with “File not found.”

## Impact

- Breaks the common “fan-out review/research sub-agents that each write a file, then parent aggregates” pattern.
- Read-only is the right default for exploration (no source edits), but a blanket write ban — including `/tmp` — conflates “don’t mutate the repo” with “can’t produce artifacts.” These are different concerns.
- Failure is silent/late: there’s no upfront capability error, so the parent only discovers it after the sub-agents finish.

### Steps to Reproduce

1. From a parent agent, launch 3 background `explore` sub-agents to review different parts of a large branch.
2. Instruct each one: “Write your findings to `/tmp/review-<area>.md` grouped by severity, then return a short summary.”
3. Wait for them to complete, then have the parent `Read` `/tmp/review-<area>.md`.

### Expected Behavior

Either:

- (A) Read-only sub-agents are allowed to write to scratch locations such as `/tmp` (and other explicitly ephemeral paths), since these are not source-code mutations and are the standard channel for passing large structured output back to the parent; **or**
- (B) The harness surfaces a clear, upfront error/capability signal so the parent knows the sub-agent cannot write files and can choose a different strategy (e.g. request inline output) — rather than the sub-agent discovering mid-task that it’s blocked.

### Operating System

Linux

### Version Information

Version: 3.6.21  
VS Code Extension API: 1.105.1  
Commit: e7a7e93f4d75f8272503ecf33cedbaae10114a10  
Date: 2026-05-28T21:45:36.072Z  
Layout: editor  
Build Type: Stable  
Release Track: Default  
Electron: 39.8.1  
Chromium: 142.0.7444.265  
Node.js: 22.22.1  
V8: 14.2.231.22-electron.0  
xterm.js: 6.1.0-beta.220  
OS: Linux x64 6.18.7-76061807-generic

### For AI issues: which model did you use?

Opus 4.8

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![kevinn](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/kevinn/32/101206_2.png) [@kevinn](https://forum.cursor.com/u/kevinn)\
**Post date:** [June 3, 2026, 10:32pm UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369/6 "2026-06-03T22:32:24Z")

</div>

hi @TomO

Thank you for the post. Read-only subagents are designed to block all filesystem mutations, so writes are blocked everywhere, including /tmp.

The intended way to pass output back is the subagent’s return message (the Task prompt param says to “specify exactly what information the agent should return back in its final response”) — so have each explore subagent return findings inline and let the parent aggregate. If you need real file artifacts, run them as non-read-only subagents (readonly: false), which can write subject to your normal permissions.

---

<div class="post-metadata">

**Author:** ![TomO](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TomO](https://forum.cursor.com/u/TomO)\
**Post date:** [June 4, 2026, 12:00am UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369/7 "2026-06-04T00:00:42Z")

</div>

Thank you @kevinn . The main agent is spawning these, so how do I configure cursor to use non-read-only for these agents that the main agent is spawning?

---

<div class="post-metadata">

**Author:** ![kevinn](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/kevinn/32/101206_2.png) [@kevinn](https://forum.cursor.com/u/kevinn)\
**Post date:** [June 8, 2026, 11:52pm UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369/8 "2026-06-08T23:52:47Z")

</div>

Hi @TomO ,

You can’t make the built-in `explore` subagent writable, as it is read-only by design. Instead, define a custom subagent, which is writable by default (`readonly` defaults to `false`), and the main agent can delegate to it.

Here’s an example:

Create `.cursor/agents/researcher.md` (project) or `~/.cursor/agents/researcher.md` (all projects):

```markdown
---
name: researcher
description: Use proactively to research parts of the codebase in parallel and write findings to a scratch file.
model: inherit
readonly: false
---

Research the area you're assigned, write findings to /tmp/<topic>.md grouped by
severity, then return a short summary.

```

The main agent auto-delegates based on the `description`, so a prompt like “research X, Y, and Z in parallel and write findings to /tmp” will route to it. You can also invoke it explicitly with `/researcher ...`.

One note: writes still go through your normal auto-run/allowlist permissions, same as the main agent, so “writable” means it’s not blocked by `readonly`, not that it bypasses permission prompts.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [July 8, 2026, 11:52pm UTC](https://forum.cursor.com/t/explore-sub-agents-silently-cannot-complete-file-writing-tasks-e-g-write-to-tmp/162369/9 "2026-07-08T23:52:58Z")

</div>

Closed on July 8, 2026, 11:52pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
