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

#394 swamp repo <unknown-subcommand> silently inits a nested repo (e.g. `swamp repo update`)

Opened by bixu · 5/20/2026· Shipped 5/21/2026

Description

swamp repo takes an optional positional [path] and exposes a real subcommand (upgrade). When an unknown subcommand is given, it is silently treated as the [path] argument and a brand-new swamp repository is scaffolded in a subdirectory named after that word — even when run from inside an existing swamp repo, and with no error, warning, or confirmation.

Concretely, a user intending to update/upgrade their repo (or the CLI) types swamp repo update and instead gets a nested repo created at ./update.

This is easy to hit because:

  • repo does have subcommands (upgrade), so users reasonably expect repo update to be one too.
  • There is a separate top-level swamp update ("Update swamp to the latest version").
  • update and upgrade are near-synonyms — an easy slip.

Steps to reproduce

  1. cd into an existing swamp repository (one with .swamp.yaml).
  2. Run swamp repo update.
  3. Observe the log line: repo·init: Initialized swamp repository at ".../update".
  4. A full scaffold now exists at ./update/ (.swamp/, .swamp.yaml, CLAUDE.md, models/, workflows/, vaults/, .claude/).

Expected behavior

One of:

  • Error on an unrecognized subcommand, e.g. unknown command 'update' for 'swamp repo'; did you mean 'swamp repo upgrade' or 'swamp update'?, or
  • At minimum, refuse or require confirmation before initializing a nested swamp repo inside an existing one (detected via a parent .swamp.yaml).

Actual behavior

The unknown subcommand is consumed as [path] and a nested repo is silently created, with success-level logging and no indication anything unexpected happened.

Environment

  • swamp 20260516.045246.0-sha.e6eda98d
  • Linux
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

5/21/2026, 7:04:55 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/21/2026, 6:36:21 AM

Sign in to post a ripple.