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

Relationships

#1174 Committed .swamp-sources.yaml relative paths resolve against worktree cwd, not the main checkout — and missing sources are now skipped silently

Opened by anthony · 7/16/2026· Shipped 7/16/2026

Summary

.swamp-sources.yaml relative path: entries are resolved against the process cwd (the worktree's physical location), not the repository's main checkout. Inside a nested git worktree (e.g. .claude/worktrees/<name>), a committed sibling source like ../spor-infra/extensions resolves to a nonexistent path — and as of the current build the missing source is silently skipped (exit 0, no warning at default log level), so type-touching operations quietly run without the sibling's extensions instead of failing loudly.

Steps to reproduce

  1. A repo ~/repos/my-repo with a committed .swamp-sources.yaml:
    sources:
      - path: ../sibling-repo/extensions
        only: [models, reports]
    and the sibling checkout at ~/repos/sibling-repo (works fine from the main checkout).
  2. Create a nested worktree: git -C ~/repos/my-repo worktree add --detach .claude/worktrees/test HEAD
  3. cd ~/repos/my-repo/.claude/worktrees/test && swamp model list

Observed

  • swamp attempts to open ~/repos/my-repo/.claude/worktrees/sibling-repo/extensions/.swamp.yaml (verified with strace -e trace=openat: 3× ENOENT) — i.e. ../sibling-repo relative to the worktree directory.
  • The command exits 0 with no warning; models still list from the datastore, but the sibling source's model types are not loaded. In an earlier build this failed loudly; the silent skip is worse because it can mask stale-type behavior in scripted/CI use.

Expected

Relative path: entries in a committed .swamp-sources.yaml should resolve against the repository's main checkout — e.g. against git rev-parse --git-common-dir's parent (or git worktree list's first entry) — so every worktree of a repo sees the same sibling sources the main checkout does. A committed file cannot carry per-worktree paths, so cwd-relative resolution makes worktree use impossible without filesystem workarounds. Failing that, an unresolvable declared source should at least warn loudly rather than skip silently.

Workaround in use

A symlink at the worktrees container level (.claude/worktrees/sibling-repo -> ~/repos/sibling-repo) so ../sibling-repo happens to resolve from every worktree in that directory. Works, but it's gitignored local state every contributor must rediscover.

Environment

  • swamp 20260716.010800.0-sha.41b2f5f0 (also present in 20260627.002632.0, where it failed loudly instead of silently)
  • Linux 6.12, git worktrees nested under the main checkout at .claude/worktrees/<name>
  • Note: SWAMP_EXTENSIONS_DIR / --extensions-dir (#381/#388) covers the local extensions/ dir split, but does not affect .swamp-sources.yaml path: resolution, which is what breaks here.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

7/16/2026, 7:45:39 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/16/2026, 2:48:33 PM
Editable. Press Enter to edit.

stack72 commented 7/16/2026, 7:45:47 PM

Thanks @anthony 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.