mirror of
https://github.com/obra/superpowers.git
synced 2026-09-25 22:09:05 +00:00
subagent-driven-development: task-N scratch filenames collide across plans, silently destroying a prior run's artifacts #2012
Labels
No labels
antigravity
automated-issue-report
brainstorming
bug
claude-code
codex
copilot
cursor
documentation
duplicate
enhancement
factory
gemini-cli
good first issue
help wanted
hermes
hooks
invalid
kiro
needs-categorization
needs-rebase-to-dev-branch
needs-repro-case
new-harness
no-obvious-human-review
opencode
pi
plans
pr-template-rules-ignored
question
skill:brainstorming
skill:diagnosing-superpowers
skill:dispatching-parallel-agents
skill:executing-plans
skill:finishing-a-development-branch
skill:receiving-code-review
skill:requesting-code-review
skills
skill:subagent-driven-development
skill:systematic-debugging
skill:test-driven-development
skill:using-git-worktrees
skill:using-superpowers
skill:verification-before-completion
skill:writing-plans
skill:writing-skills
stale
subagents
tdd
trae
triage
upstream-bug
windows
wontfix
worktrees
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
skills/obra-superpowers#2012
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Running a second plan through
subagent-driven-developmentin a repo that has already run one will silently overwrite the first plan's scratch files. I lost two files this way today before noticing the pattern.Cause
Scratch lives in a single repo-level
.superpowers/sdd/directory, and the filenames are keyed on task number, which restarts at 1 for every plan.scripts/task-briefline 24:The skill's report-file convention has the same shape (
task-N-report.md), andprogress.mdis a single shared ledger that every run appends to.So plan B's Task 1 writes over plan A's Task 1. Nothing warns, and because
.superpowers/sdd/is gitignored there's no history to recover from.Notably,
scripts/review-packagein the same directory does not have this problem — line 27 keys on commit SHAs, which are globally unique:Why renaming afterward doesn't help
My first instinct was to generate the brief and immediately
mvit to a namespaced name. That doesn't work — the clobber happens during generation, so the prior file is already gone by the time you can rename. The only safe workaround is to copy anything precious out of the way before invokingtask-brief, which nothing in the skill tells you to do.What I actually lost
A repo with three prior runs (~50 accumulated scratch files, four unrelated projects in one
progress.md). Starting a fourth plan destroyed:task-1-report.md— a completed prior task's report, overwritten by a subagent following the skill's own report-file instructiontask-2-brief.md— overwritten bytask-briefitselfBoth unrecoverable. The underlying commits survived in git, so what was lost was the narrative record rather than code — but on a run where the ledger is the recovery map after compaction, that's not nothing. Twelve more files were in the blast radius before I noticed and copied them aside.
Suggested fix
One level of nesting makes collisions structurally impossible rather than merely unlikely:
where
<plan-slug>derives from the plan filename (which the skill already requires and which is already unique per project).task-briefalready accepts an optional thirdOUTFILEargument, so a caller can namespace manually today — but the default is what everyone will hit.A cheaper interim fix, if the layout change is too invasive: have
task-briefrefuse to overwrite an existing file unless--forceis passed. That converts silent data loss into a visible error.Environment
superpowers v6.1.1, Claude Code, macOS.