Every magpie subcommand ran the start-up moves before its own work:
RenameLegacy and the effort moves list every provider and account,
which starts the bun plugin host and runs claude auth status, a full
claude -p /usage, cursor-agent about and devin auth status. Claude Code
starts `magpie mcp image` for each session and `magpie statusline` on
every message, so a machine with 16 Claude sessions held 16 plugin
hosts beside the GUI's (~1.3GB footprint), and each status line took
5s. These three talk to the running gateway and nothing else; they are
now dispatched before the moves, which become startUp so a test can
tell whether they ran.
Run at 7b1faf99f + this change (macOS, real HOME, read-only commands):
- old (origin/main build) `mcp image`: 4 child processes after 2s,
footprint 57MB; new: 0 children, 17MB.
- `statusline` against the live gateway: 5.24s old, 0.13s new, same
line printed.
- initialize + tools/list over stdio: same replies from both builds.
- TestSessionCommandsSkipStartUp: ok; red with startUp() moved back
above the dispatch by hand ("[mcp image] ran the start-up moves").
- go test -tags nogui ./internal/cli ./internal/imagemcp
./internal/claudebridge: ok. gofmt clean; go vet GOOS=linux and
GOOS=windows -tags nogui, and darwin with the GUI: clean.
Not run: the full suite. Not tried on Linux or Windows.