-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When using resolveModule() in a workflow with engine: 'claude' specified, the engine option is ignored and CodeMachine attempts to use Codex instead, even when:
- Codex CLI is not installed
- The workflow explicitly sets
engine: 'claude' - The module config in
config/modules.jshasengine: 'claude'
Steps to Reproduce
- Configure a workflow with a module using Claude engine:
// codemachine.workflow.js
export default {
name: 'My Workflow',
steps: [
resolveStep('some-agent', { engine: 'claude' }), // Works fine
resolveModule('check-task', { engine: 'claude', loopSteps: 6 }), // Fails
],
};- Optionally add
engine: 'claude'to the module config:
// config/modules.js
{
id: 'check-task',
name: 'Task Completion Checker',
promptPath: '...',
engine: 'claude', // Also ignored
behavior: { type: 'loop', action: 'stepBack' },
}- Run the workflow with
/start
Expected Behavior
The check-task module should execute using Claude as specified.
Actual Behavior
error: Codex authentication required
at d$ (/$bunfs/root/runner-process.js:114:9)
at async N5 (/$bunfs/root/runner-process.js:114:706)
at async b4 (/$bunfs/root/runner-process.js:299:2259)
at async mz (/$bunfs/root/runner-process.js:624:6766)
at async iz (/$bunfs/root/runner-process.js:645:1044)
Analysis
Looking at the minified source, the engine resolution logic appears to be:
if(R)s=R;else if(DA.engine)s=DA.engine;else{...fallback}For resolveStep(), the engine parameter (R) is properly passed through. However, for resolveModule(), neither the workflow option nor the module config's engine property appears to be read, causing it to fall through to the fallback which defaults to Codex.
Environment
- CodeMachine version: 0.7.0
- OS: macOS
- Claude CLI: Installed and authenticated
- Codex CLI: Not installed
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working