Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

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:

  • resolvePrimaryTool still returns claude ([][0] ?? "claude"), so audit and skills treat claude as the tool.
  • enrolledTools (src/domain/repo/primary_tool.ts) treats [] as nothing enrolled.
  • swamp repo upgrade therefore prints "swamp's settings for claude, which is not enrolled, remain in .claude/settings.local.json. Run swamp repo prune to 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.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 8 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/6/2026, 5:23:22 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/6/2026, 4:36:55 PM

Sign in to post a ripple.