What to build
The agent model has a four-level precedence chain with no config rung. Today it resolves as
per-call option → schedule override → workflow default → a DEFAULT_MODEL constant hardcoded in
runtime/run.ts. A project cannot set its own default model anywhere.
That constant is also already stale: it reads opencode-go/deepseek-v4.1-flash, while AGENTS.md
says the preferred model for real agent tests is opencode-go/big-pickle. A provider-qualified
model id living in the runtime is the wrong home for a value that is plainly project policy —
factory.config.ts already owns repo, identity, concurrency, retention and schedules.
Add an agent.model default to FactoryConfig, so the chain becomes run request → schedule →
workflow → config → built-in fallback. This mirrors the precedence rule epic #19 already
established for everything a schedule can override.
Keep a built-in fallback for the config-less paths: factory run without a project config, and a
daemon started with no config, both still have to pick something.
Acceptance criteria
Blocked by
None (can start immediately).
What to build
The agent model has a four-level precedence chain with no config rung. Today it resolves as
per-call option → schedule override → workflow default → a
DEFAULT_MODELconstant hardcoded inruntime/run.ts. A project cannot set its own default model anywhere.That constant is also already stale: it reads
opencode-go/deepseek-v4.1-flash, whileAGENTS.mdsays the preferred model for real agent tests is
opencode-go/big-pickle. A provider-qualifiedmodel id living in the runtime is the wrong home for a value that is plainly project policy —
factory.config.tsalready owns repo, identity, concurrency, retention and schedules.Add an
agent.modeldefault toFactoryConfig, so the chain becomes run request → schedule →workflow → config → built-in fallback. This mirrors the precedence rule epic #19 already
established for everything a schedule can override.
Keep a built-in fallback for the config-less paths:
factory runwithout a project config, and adaemon started with no config, both still have to pick something.
Acceptance criteria
factory.config.tsaccepts anagent.modeldefault, validated at load like the rest of the configAGENTS.mdrecommendsbun run checkpassesBlocked by
None (can start immediately).