Skip to content

resolveModule() ignores engine parameter, defaults to Codex #39

@buckstrdr

Description

@buckstrdr

When using resolveModule() in a workflow file, the engine parameter is ignored. The module always executes using Codex regardless of the specified engine.

Steps to Reproduce:

  1. Create a workflow with resolveModule() specifying engine: 'claude':
    resolveModule('check-task', {
    engine: 'claude',
    model: 'sonnet',
    loopSteps: 6,
    loopMaxIterations: 30,
    loopSkip: ['runtime-prep']
    }),

  2. Run the workflow with codemachine

  3. Observe the check-task module execution

Expected Behavior:
Module should execute using Claude Code with the sonnet model.

Actual Behavior:
Module executes using Codex, causing error:
[CYAN]● Codex is analyzing your request...
Task Completion Checker failed: Codex CLI exited with code 1
{"type":"error","message":"unexpected status 400 Bad Request: {"detail":"The 'sonnet' model is not supported when using Codex with a ChatGPT account."}"}

Note: resolveStep() correctly respects the engine parameter - only resolveModule() has this issue.

Environment:

  • CodeMachine version: (run codemachine --version)
  • OS: Linux (Ubuntu)
  • Node: v22.20.0

Workaround:
Use Codex-compatible settings for modules:
resolveModule('check-task', {
engine: 'codex',
model: 'gpt-5',
// ...
}),

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions