Files
ruflo/v3/@claude-flow/cli/src/commands
rUv c20b71f7b7 fix(swarm): report a real swarm id, and make swarm stop usable without one (#3253)
`swarm status --format json` returned the literal string 'no-active-swarm' as
the value of `id` while also returning `hasActiveSwarm: true` and 9 agents, and
bare `swarm stop` always failed with no CLI surface exposing an id to pass.

The id is persisted by three writers under two keys in two files:
`swarm init` -> `.swarm/state.json` `id`; `swarm start` -> the same file's
`swarmId`; MCP `swarm_init` -> `.claude-flow/swarm/swarm-state.json`. The reader
checked one. `swarm start` overwrites `init`'s file with a disjoint key set, so
the file existed (hasActiveSwarm true) but carried the id under a key nobody
read (id sentinel).

- resolve the id from all three writers, both local keys first
- emit `null`, never a sentinel, when the id is genuinely unknown
- default `stop` and `scale` to the resolved id; explicit arg still wins
- have `start` write `id` alongside `swarmId`
- stop a stopped state file from shadowing a live swarm, claiming to be
  active, or reporting `ready`
2026-09-16 02:24:20 +00:00
..
2026-01-07 04:36:20 +00:00
2026-01-07 20:26:08 +00:00
2026-01-13 15:41:54 +00:00