Skip to content

feat(spawn): add --model to launch spawned agents on a chosen model#220

Merged
fujibee merged 1 commit into
mainfrom
feat/spawn-model
Jun 25, 2026
Merged

feat(spawn): add --model to launch spawned agents on a chosen model#220
fujibee merged 1 commit into
mainfrom
feat/spawn-model

Conversation

@fujibee

@fujibee fujibee commented Jun 24, 2026

Copy link
Copy Markdown
Owner

What

Adds spawn.sh --model <id> to launch a spawned agent on a specific model.

/agmsg spawn claude-code reviewer --model claude-opus-4-8
/agmsg spawn codex helper --model gpt-5

How

  • Pass-through id. The model id is handed to the CLI unchecked — the CLI rejects an unknown id — so agmsg never tracks each vendor's model list (which would go stale).
  • Per-type flag spelling comes from the manifest model_arg= (claude-code--model, codex-m). The flag is inserted into the direct-CLI launch between the binary and the actas prompt.
  • A type with no model_arg has no known flag, so --model is refused with agent type 'X' does not support --model rather than guessed.

Tests

  • --model lands the per-type flag in the boot script (claude --model <id>, codex -m <id>).
  • --model on a type with no model_arg errors clearly.
  • No --model leaves the launch flag-free.
  • Full bats suite: green.

Per-type model_arg

Added for the spawnable types: claude-code--model, codex-m, grok-build--model. The motivating case is /agmsg spawn grok-build <name> --model grok-build — spawning grok on the grok-build model (X search needs it; the composer-fast default can't). gemini/cursor aren't spawnable, so they don't need it yet.

Rebased onto main after #216 (grok-build) and #219 (delivery scoping) landed.

Closes #135.

`spawn.sh --model <id>` launches the agent on a specific model. The id is
pass-through — handed to the CLI unchecked (the CLI rejects an unknown id), so
agmsg never has to track each vendor's model list, which would go stale.

The model FLAG spelling differs per CLI, so it comes from the manifest
`model_arg=`: claude-code uses `--model`, codex uses `-m`. A type with no
model_arg has no known flag, so `--model` is refused with a clear error rather
than guessed. The flag is inserted into the direct-CLI launch between the binary
and the actas prompt.

Tests: per-type flag spelling lands in the boot script (claude `--model`, codex
`-m`); a type with no model_arg is refused; no --model leaves the launch
flag-free.
@fujibee fujibee force-pushed the feat/spawn-model branch from 7e16aef to c1cad2c Compare June 25, 2026 00:31
@fujibee fujibee merged commit f142f07 into main Jun 25, 2026
5 of 6 checks passed
@fujibee fujibee deleted the feat/spawn-model branch June 25, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: spawn.sh — add --model to launch spawned agents on a chosen model

1 participant