Droid: decide whether to honor role-specific model config on launch
Context (shared across all harnesses)
AO stores a per-role model in agentConfig.model (backend/internal/domain/agentconfig.go:27). session_manager.effectiveAgentConfig merges the project base config with the role override and Spawn/Restore forward the resolved value into every adapter as cfg.Config.Model (backend/internal/ports/agent.go). Each adapter must opt in to forwarding that value to its CLI. Today only the Claude (claudecode/claudecode.go:172), Codex (#2869), and Kiro (config-file model key) adapters do. Every other adapter silently drops it, so a configured worker/orchestrator falls back to the CLI's global default model.
- Original report: #2769
- Reference fix (the pattern to copy): #2869 (Codex) — adds an
appendModelFlaghelper called in bothGetLaunchCommandandGetRestoreCommand, plus aGetConfigSpecmodelfield and regression tests.
Decision needed
The Droid (Factory) adapter (droid, binary droid) does not forward cfg.Config.Model, and this is currently by design — the package comment states "Droid resolves its model and other defaults from the user's own settings; only the autonomy level is overridden" (droid/droid.go:70-74, :149-169). We need a product/architecture decision on whether AO should override the model for Droid roles.
Findings
- No interactive
--modelflag.-m, --model <id>exists only ondroid exec; the interactivedroid [prompt]mode AO launches changes model via/modelorCtrl+Nmid-session (Factory CLI reference — https://docs.factory.ai/reference/cli-reference). - Model is settable via the settings file AO already writes and passes: top-level
"model": "<id>"in the JSON blob emitted bypermissionSettingsArgs(droid/droid.go:180-198) and passed with--settings <path>. Currently that file is written only for non-default permission modes and carries onlyautonomyLevel(Factory settings docs — https://docs.factory.ai/cli/configuration/settings). - Upstream risk: open Factory issues show model-config precedence flakiness (Factory-AI/factory #660, #787), and the docs don't explicitly confirm the top-level
modelin a--settingsfile overrides the session.
Options
- Honor it: add top-level
"model": strings.TrimSpace(cfg.Config.Model)to the settings blob and emit--settingswhenever autonomy or model is set. Requires verifying against a livedroidthat--settingsmodel actually re-pins the session model. - Keep deferring to the user's
~/.factory/settings.jsonand document thatagentConfig.modelis intentionally a no-op for Droid.
Suggested fix (only if option 1 chosen)
Extend the settings builder (permissionSettingsArgs) with the top-level model key; always write the settings file when a model is set; add a GetConfigSpec model field; add regression tests. Do not add a --model argv flag — the interactive binary rejects it.
References
- Reference fix: #2869 (Codex) · Original context: #2769
- Relevant file:
backend/internal/adapters/agent/droid/droid.go
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @pulkit7070
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @pulkit7070 here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
starting this one !