Skip to main content
← Back to list
01Issue
BugShippedSwamp CLITeam
Assigneesstack72

Relationships

#1056 extension pull only materializes skills for the primary tool, deletes other enrolled tools' copies

Opened by jeremy · 7/9/2026· Shipped 7/10/2026

Summary

In a repo enrolled in more than one AI tool (.swamp.yaml tools: with 2+ entries), swamp extension pull (and sibling commands) only ever materializes an extension's skills for tools[0] — the "primary" tool. Worse, because pull diffs against the lockfile's previously-recorded file paths, re-pulling after the primary tool changes actively deletes the previous primary's skill files rather than leaving them alone or writing to both.

Root cause

  • resolvePrimaryTool() (src/domain/repo/primary_tool.ts:35-37) always returns marker.tools[0]. There is no concept of "all enrolled tools" for skill materialization — only a single primary one.
  • Every skill-writing command resolves that single primary tool and reads/writes only its skills directory: extension_pull.ts:245-246, plus extension_update.ts, extension_rm.ts, extension_list.ts, extension_source_add.ts, extension_source_rm.ts, doctor_extensions.ts. None of these accept a --tool flag to target a specific enrolled tool.
  • repo_service.ts:156-160 documents the intended UX: when a new tool is enrolled via swamp repo upgrade --tool <a> --tool <b>, extensionsToReinstall is surfaced so the renderer can advise "re-run swamp extension pull <name> to install for <newTool>" (see repo_init.ts:250-254). This advice assumes pull is additive per-tool. It isn't — pull always targets tools[0] regardless of which tool the message names, and it deletes whatever the previous primary's files were.

Repro

  1. swamp repo init --tool kiro (single tool)
  2. swamp extension pull <ext-with-skills> — skills land in .kiro/skills/
  3. swamp repo upgrade --tool claude --tool kiro — adds claude, warns: "N extension(s) installed for the previous tool were NOT copied to claude. Re-run swamp extension pull <name> to install for claude: ..."
  4. Follow the advice: swamp extension pull <ext-with-skills> --force
  5. Observe: skills now exist under .claude/skills/ (tools[0] is now claude), AND the log reports removing .kiro/skills/<skill> as "no longer in" the new version — kiro's copies are gone.

Impact

Any swamp repo enrolled in 2+ AI tools can only ever have extension-provided skills materialized for one tool at a time. There's no supported way to keep multiple enrolled tools' extension skills in sync, and the built-in remediation message actively makes it worse for the non-primary tool by deleting its copies on the next pull/update/rm.

Suggested fix

resolveSkillsDir/resolvePrimaryTool callers that mutate the skills directory (pull, update, rm, source_add, source_rm) should fan out to resolveSkillsDir(repoDir, tool) for every tool in marker.tools, not just tools[0], mirroring the (currently unused for this purpose) resolveUniqueGlobalSkillsDirs pattern already used for global skill dirs (skill_dirs.ts:82-95).

Environment

swamp 20260708.163706.0-sha.a3be0656

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 7 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

7/10/2026, 10:09:12 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/10/2026, 8:30:28 PM
Editable. Press Enter to edit.

stack72 commented 7/10/2026, 10:09:20 PM

Thanks @jeremy for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.