forked from mosaicstack/stack
`mosaic yolo <runtime>` forwarded `cmd.args` (which Commander populates with the declared `<runtime>` positional) to the underlying CLI. For the claude runtime that meant argv included the literal string "claude" as an initial positional argument, which Claude Code interpreted as the first user message. As a secondary consequence, the mission-auto-prompt path was also bypassed because `hasMissionNoArgs` saw a non-empty args list. Refactor the runtime subcommand wiring into an exported `registerRuntimeLaunchers(program, handler)` factory with a `RuntimeLaunchHandler` type so the commander integration is unit-testable without spawning subprocesses. Slice the declared positional off `cmd.args` in the yolo action before forwarding. Adds `packages/mosaic/src/commands/launch.spec.ts` with 11 regression tests covering all four runtimes (claude, codex, opencode, pi) for both `<runtime>` and `yolo <runtime>` paths, excess-args forwarding, and invalid-runtime rejection. The critical assertion blocks the regression: yolo parses must forward `extraArgs = []`, not `[runtime]`. Fixes mosaicstack/stack#454 Co-Authored-By: Claude Opus 4.6 <[email protected]>