Skip to content

feat(spawn): add per-session --model override with durable persistence#2225

Open
exuan wants to merge 1 commit into
AgentWrapper:mainfrom
exuan:feat/spawn-model-go
Open

feat(spawn): add per-session --model override with durable persistence#2225
exuan wants to merge 1 commit into
AgentWrapper:mainfrom
exuan:feat/spawn-model-go

Conversation

@exuan

@exuan exuan commented Jun 27, 2026

Copy link
Copy Markdown

ao spawn --model <model> overrides the agent model for a single session, taking precedence over the project/role worker.agentConfig.model. The value is threaded CLI -> POST /sessions -> SpawnConfig -> session manager, which applies it on top of effectiveAgentConfig (base <- role <- per-spawn) so the claude-code adapter (and the codex adapter, updated here) emit --model.

Persisted on the session record (new model column, migration 0020) and re-applied on restore, so a daemon restart restores the session on the same model instead of re-resolving from project config -- matching how branch / prompt / workspace already survive restarts.

Tests: codex adapter flag emission (+ ordering before the prompt separator); sqlite persistence round-trip; manager spawn override + config fallback.

`ao spawn --model <model>` overrides the agent model for a single session,
taking precedence over the project/role worker.agentConfig.model. The value
is threaded CLI -> POST /sessions -> SpawnConfig -> session manager, which
applies it on top of effectiveAgentConfig (base <- role <- per-spawn) so the
claude-code adapter (and the codex adapter, updated here) emit `--model`.

Persisted on the session record (new `model` column, migration 0020) and
re-applied on restore, so a daemon restart restores the session on the same
model instead of re-resolving from project config -- matching how branch /
prompt / workspace already survive restarts.

Tests: codex adapter flag emission (+ ordering before the prompt separator);
sqlite persistence round-trip; manager spawn override + config fallback.
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.

1 participant