Engine Registry
Agent Config
Override in
main.agents.jsWorkflow Step
Override in
workflow.jsRuntime Execution
Final resolution with auth fallback
Available Engines
Agent Configuration
Configure engine and model inconfig/main.agents.js for individual agents.
Agent Schema
Examples
Engine + Model:Workflow Step Overrides
Override engine and model per step in yourworkflow.js files.
Override Schema
Using resolveStep()
Using resolveFolder()
Apply overrides to all steps from a folder:
Using resolveModule()
Model Reasoning Effort
Only supported by certain engines (currently Codex).Practical Examples
Fast Prototyping
Use faster, cheaper models:Production Quality
Use powerful models:Mixed Engine Workflow
Leverage different engines for their strengths:Engine Fallback System
When running a workflow, CodeMachine resolves the engine and model through a fallback system.How It Works
1
Pick Engine
- Use step/CLI override if specified
- Else use agent config (
enginefield) - Else find first authenticated engine by order
2
Check Authentication
- If selected engine is not authenticated → try next authenticated engine
- If none authenticated → use registry default (first by order)
3
Select Model
- If engine fell back, agent’s model is ignored (uses engine’s default)
- Otherwise: step override → agent config → engine default
Default Engine & Model
Default engine:
opencode (order: 1)
Default model: opencode/big-pickleEngine Fallback Order
Engines are tried in this order when falling back:If no engine is specified and
opencode is authenticated, it’s used. If opencode isn’t authenticated, it tries claude, then codex, and so on.Validation
The workflow validator checks:modelmust be a string (if provided)modelReasoningEffortmust be'low','medium', or'high'enginemust be a valid engine ID from the registry