All ideasMore in Work

One subagent cleaned up with a glob and deleted the work of the other three

Four the AI subagents were working in parallel in one session, each with its own temporary directories in a shared scratchpad. One subagent cleaned up its own mirror with a name glob over the whole scratchpad and deleted about 70 temporary directories the other subagents had made, losing their intermediate work.

This one went wrong. Read what happened so you don’t hit the same problem.

How it works

  1. Four subagents run in parallel in one session
  2. Each makes temporary directories with mktemp in the shared scratchpad
  3. One subagent cleans up its own mirror with a find command matching every tmp name in the scratchpad
  4. About 70 directories made by the other subagents are deleted
  5. Named files are not touched, but the other agents' intermediate work is lost

Why it’s worth knowing

The cleanup command was aimed at one agent's own mirror. A two letter glob in a shared folder turned it into a delete of every other agent's work space.

Where it’s from

Summarized from a public post on github.com. See the original ↗

Upgraded prompt

A ready-to-use prompt for this idea, built from research on what makes AI agents do the job right: who the AI should be, the exact steps, and a check to make sure it was done the way you wanted.

1Who the AI should be
2The prompt, with the steps
3The check when it’s done
Upgraded prompts are coming soon.

Try next

Every idea is a real post from someone who tried it, summarized in our words, with a link to the original. App names are swapped for plain words.