Relationships
#4480 repo upgrade tells a repo with tools: [] from an older upgrade to prune claude hooks it still uses
Opened by zack · 11/6/2026· Shipped 11/6/2026
What
Follow-up to #4447 (PR swamp-club/swamp#3646). A repo whose .swamp.yaml once had no tools field, and which then ran a plain swamp repo upgrade on a release before #4447, now has tools: [] on disk. That is indistinguishable from an explicit --tool none.
For such a repo:
resolvePrimaryToolstill returnsclaude([][0] ?? "claude"), so audit and skills treat claude as the tool.enrolledTools(src/domain/repo/primary_tool.ts) treats[]as nothing enrolled.swamp repo upgradetherefore prints "swamp's settings for claude, which is not enrolled, remain in .claude/settings.local.json. Runswamp repo pruneto remove them."- Following it removes the live claude audit hooks and audit recording silently stops.
Prune previews and asks before removing anything, so this is not silent, but the note steers the user toward the wrong action.
Expected
When no tools are enrolled (an explicit empty list), the leftover note in repo upgrade / repo init and the swamp repo prune preview add a hint along the lines of: "If you still use claude, enroll it with swamp repo upgrade --tool claude instead of pruning."
Optionally, consider recording an explicit none distinctly from an empty list going forward so the two cases can be told apart.
Where
src/presentation/renderers/repo_init.ts(leftoverSettingsLines,droppedToolLines)src/presentation/renderers/repo_prune.ts(formatPruneLines)src/domain/repo/primary_tool.ts(enrolledTools,resolvePrimaryTool)
Found by the adversarial review in the verification of #4447.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.