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

Relationships

#2072 repo upgrade/init hardcode absolute swamp binary path in hook commands, breaking cross-machine portability

Opened by webframp · 9/9/2026· Shipped 9/9/2026

Summary

swamp repo init and swamp repo upgrade write the audit hook command with the operator's absolute path to the swamp binary, e.g.:

"command": "\"/Users/[REDACTED]/.nix-profile/bin/swamp\" audit record --from-hook --tool kiro"

This appears in both:

  • .kiro/agents/swamp.json (postToolUse hook)
  • .kiro/hooks/swamp-audit.kiro.hook

(and presumably the equivalent hook files for other enrolled tools).

Impact

The absolute path is not portable across machines:

  • I develop on both macOS (/Users/[REDACTED]/.nix-profile/bin/swamp) and NixOS (/home/[REDACTED]/.nix-profile/bin/swamp). The committed hook path only works on whichever machine last ran init/upgrade.
  • On the other machine the hook silently fails (wrong path), so audit records stop being written with no obvious signal.
  • I fix it manually by using a bare swamp (relies on PATH, works on both machines), but every swamp repo upgrade re-applies the absolute path, silently reverting the fix. This is a recurring papercut in any repo shared across machines or committed to git.

Expected

Hook commands should be portable by default. Options, roughly in order of preference:

  1. Emit a bare swamp and rely on PATH (simplest; works anywhere swamp is on PATH).
  2. Emit an env-var-based path like ${SWAMP_BIN:-swamp} so operators can override without editing generated files.
  3. Make the path configurable in repo settings and only fall back to an absolute path when swamp is not on PATH.
  4. At minimum: preserve a manually-edited hook command across repo upgrade instead of overwriting it.

Reproduction

  1. swamp repo init --tool kiro (or repo upgrade) on a machine where swamp is at an absolute path
  2. Inspect .kiro/hooks/swamp-audit.kiro.hook — command contains the absolute path
  3. Commit, clone on a second machine with a different $HOME, run any tool op — the audit hook silently no-ops

Environment

  • swamp 20260909.001808.0
  • Machines: macOS (darwin) and NixOS, swamp installed via nix profile in both (~/.nix-profile/bin/swamp, different $HOME roots)
  • Tools enrolled: claude, kiro, codex, pi
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 3 MOREFINDINGS+ 11 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/9/2026, 5:14:46 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/9/2026, 3:54:58 AM
Editable. Press Enter to edit.

stack72 commented 9/9/2026, 5:14:56 AM

Thanks @webframp for reporting this! We shipped: Switch Kiro hook commands from absolute swamp binary path to bare "swamp" (matching all other tools), remove resolveSwampBinaryPath(), and simplify the doctor check to treat Kiro like every other tool with PATH-only validation.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.