mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
feat(core): implement git worktree checkpoint system
Add comprehensive worktree management system to enable task isolation and rollback capabilities. This allows users to revert agent changes if they don't satisfy requirements or break functionality. Key components: - New WorktreeManager service for branch and worktree operations - GitDiffPanel component for visualizing changes - Enhanced UI components with worktree integration - Auto-mode service enhancements for worktree workflow Modified files: worktree-manager.js, git-diff-panel.tsx, main.js, preload.js, feature-loader.js, agent-output-modal.tsx, board-view.tsx, kanban-card.tsx, electron.ts, app-store.ts, electron.d.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
@@ -1,259 +0,0 @@
|
||||
📋 Planning implementation for: So we added support for codex cli models but when we select them on model tab its still trying to use claude model there is some race condition in the code
|
||||
|
||||
1] [AutoMode] Running specific feature: feature-1765334118538-zc6n2ngu8
|
||||
[1] [AutoMode] Running feature: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureLoader] Created backup at /Users/shirone/Documents/Projekty/automaker/.automaker/feature_list.backup.json
|
||||
[1] [FeatureLoader] Updated feature feature-1765334118538-zc6n2ngu8: status=in_progress
|
||||
[1] [FeatureLoader] Successfully saved 13 features to feature_list.json
|
||||
[1] [FeatureExecutor] Implementing: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] Phase: PLANNING for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] getModelString: modelKey=gpt-5.1-codex, modelString=claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Using provider: Codex/OpenAI, model: claude-opus-4-5-20251101, thinking: none
|
||||
[1] [FeatureExecutor] Phase: ACTION for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] ERROR: Codex provider selected but Claude model string detected: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Feature model: gpt-5.1-codex, modelString: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Error implementing feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [FeatureExecutor] Error details: {
|
||||
[1] message: "Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.",
|
||||
[1] stack: "Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n" +
|
||||
[1] ' at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n' +
|
||||
[1] ' at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n' +
|
||||
[1] ' at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n' +
|
||||
[1] ' at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)',
|
||||
[1] name: 'Error',
|
||||
[1] code: undefined,
|
||||
[1] model: 'not initialized',
|
||||
[1] provider: 'unknown',
|
||||
[1] isCodex: 'unknown'
|
||||
[1] }
|
||||
[1] [AutoMode] Error running feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [IPC] auto-mode:run-feature error: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
|
||||
⚡ Executing implementation for: So we added support for codex cli models but when we select them on model tab its still trying to use claude model there is some race condition in the code
|
||||
|
||||
1] [AutoMode] Running specific feature: feature-1765334118538-zc6n2ngu8
|
||||
[1] [AutoMode] Running feature: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureLoader] Created backup at /Users/shirone/Documents/Projekty/automaker/.automaker/feature_list.backup.json
|
||||
[1] [FeatureLoader] Updated feature feature-1765334118538-zc6n2ngu8: status=in_progress
|
||||
[1] [FeatureLoader] Successfully saved 13 features to feature_list.json
|
||||
[1] [FeatureExecutor] Implementing: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] Phase: PLANNING for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] getModelString: modelKey=gpt-5.1-codex, modelString=claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Using provider: Codex/OpenAI, model: claude-opus-4-5-20251101, thinking: none
|
||||
[1] [FeatureExecutor] Phase: ACTION for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] ERROR: Codex provider selected but Claude model string detected: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Feature model: gpt-5.1-codex, modelString: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Error implementing feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [FeatureExecutor] Error details: {
|
||||
[1] message: "Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.",
|
||||
[1] stack: "Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n" +
|
||||
[1] ' at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n' +
|
||||
[1] ' at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n' +
|
||||
[1] ' at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n' +
|
||||
[1] ' at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)',
|
||||
[1] name: 'Error',
|
||||
[1] code: undefined,
|
||||
[1] model: 'not initialized',
|
||||
[1] provider: 'unknown',
|
||||
[1] isCodex: 'unknown'
|
||||
[1] }
|
||||
[1] [AutoMode] Error running feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [IPC] auto-mode:run-feature error: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
|
||||
Starting code implementation...
|
||||
|
||||
🔧 Tool: Read
|
||||
|
||||
🔧 Tool: Grep
|
||||
Let me read the model-registry.js file to understand how `getModelString` works there:
|
||||
🔧 Tool: Read
|
||||
|
||||
🔧 Tool: Read
|
||||
Now I understand the issue! The problem is in `feature-executor.js` in the `getModelString` method. Let me trace through the logic:
|
||||
|
||||
1. When `modelKey = "gpt-5.1-codex"`, it calls `ModelRegistry.getModelString(modelKey)`
|
||||
2. In `model-registry.js`, `getModelString` looks up `MODELS[modelId]` and returns `model.modelString`
|
||||
3. However, looking at the flow more carefully, I see that `ModelRegistry.getModelString('gpt-5.1-codex')` should return `'gpt-5.1-codex'` correctly since `MODELS['gpt-5.1-codex'].modelString = 'gpt-5.1-codex'`
|
||||
|
||||
But the log shows:
|
||||
```
|
||||
[FeatureExecutor] getModelString: modelKey=gpt-5.1-codex, modelString=claude-opus-4-5-20251101
|
||||
```
|
||||
|
||||
Let me look at the `getModelString` in feature-executor.js more closely. The issue is the **fallback logic**:
|
||||
|
||||
```javascript
|
||||
// Use the registry for model lookup
|
||||
let modelString = ModelRegistry.getModelString(modelKey);
|
||||
|
||||
// Fallback to MODEL_MAP if registry doesn't have it
|
||||
if (!modelString || modelString === modelKey) {
|
||||
modelString = MODEL_MAP[modelKey];
|
||||
}
|
||||
|
||||
// Final fallback to opus
|
||||
if (!modelString) {
|
||||
modelString = MODEL_MAP.opus;
|
||||
}
|
||||
```
|
||||
|
||||
The problem is in line 42-44:
|
||||
- `ModelRegistry.getModelString('gpt-5.1-codex')` returns `'gpt-5.1-codex'` (which is correct!)
|
||||
- But then the condition `modelString === modelKey` is TRUE (because both are `'gpt-5.1-codex'`)
|
||||
- So it falls through to `MODEL_MAP[modelKey]` which is `MODEL_MAP['gpt-5.1-codex']`
|
||||
- Since `MODEL_MAP` only has `haiku`, `sonnet`, and `opus`, it returns `undefined`
|
||||
- Then the final fallback `if (!modelString)` kicks in and returns `MODEL_MAP.opus` which is `'claude-opus-4-5-20251101'`
|
||||
|
||||
This is the race condition / bug! The code assumes that if the modelString equals the modelKey, it means the registry didn't have a proper mapping. But for Codex models, the modelString IS the same as the modelKey (they're designed that way).
|
||||
|
||||
Let me fix this:
|
||||
🔧 Tool: Edit
|
||||
The fix is in place. Now let me verify that the `resumeFeatureWithContext` method in the same file doesn't have a similar issue. Let me check if it uses the same `getModelString` method:
|
||||
🔧 Tool: Read
|
||||
I see that `resumeFeatureWithContext` uses `this.getModelString(feature)` at line 562, which is the same method I just fixed. However, I notice that it's still using the Claude SDK `query` directly (line 616) instead of checking if it should use the Codex provider. Let me check the `resumeFeatureWithContext` method more thoroughly:
|
||||
🔧 Tool: Grep
|
||||
Let me see more of the resumeFeatureWithContext method:
|
||||
🔧 Tool: Read
|
||||
I see that `resumeFeatureWithContext` also doesn't check for Codex models - it always uses the Claude SDK `query`. This is the same issue as in `implementFeature`. Let me fix the `resumeFeatureWithContext` method to also support Codex models properly. First let me see the full method context to understand how to apply the fix:
|
||||
🔧 Tool: Read
|
||||
Now I need to fix the `resumeFeatureWithContext` method to support Codex models. The fix should be similar to `implementFeature`:
|
||||
🔧 Tool: Edit
|
||||
Input: {
|
||||
"file_path": "/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js",
|
||||
"old_string": " console.log(`[FeatureExecutor] Resuming with model: ${modelString}, thinking: ${feature.thinkingLevel || 'none'}`);\n\n const options = {\n model: modelString,\n systemPrompt: promptBuilder.getVerificationPrompt(),\n maxTurns: 1000,\n cwd: projectPath,\n mcpServers: {\n \"automaker-tools\": featureToolsServer\n },\n allowedTools: [\"Read\", \"Write\", \"Edit\", \"Glob\", \"Grep\", \"Bash\", \"WebSearch\", \"WebFetch\", \"mcp__automaker-tools__UpdateFeatureStatus\"],\n permissionMode: \"acceptEdits\",\n sandbox: {\n enabled: true,\n autoAllowBashIfSandboxed: true,\n },\n abortController: abortController,\n };\n\n // Add thinking configuration if enabled\n if (thinkingConfig) {\n options.thinking = thinkingConfig;\n }\n\n // Build prompt with previous context\n const prompt = promptBuilder.buildResumePrompt(feature, previousContext);\n\n const currentQuery = query({ prompt, options });\n execution.query = currentQuery;",
|
||||
"new_string": " const isCodex = this.isCodexModel(feature);\n const providerName = isCodex ? 'Codex/OpenAI' : 'Claude';\n console.log(`[FeatureExecutor] Resuming with provider: ${providerName}, model: ${modelString}, thinking: ${feature.thinkingLevel || 'none'}`);\n\n const options = {\n model: modelString,\n systemPrompt: promptBuilder.getVerificationPrompt(),\n maxTurns: 1000,\n cwd: projectPath,\n mcpServers: {\n \"automaker-tools\": featureToolsServer\n },\n allowedTools: [\"Read\", \"Write\", \"Edit\", \"Glob\", \"Grep\", \"Bash\", \"WebSearch\", \"WebFetch\", \"mcp__automaker-tools__UpdateFeatureStatus\"],\n permissionMode: \"acceptEdits\",\n sandbox: {\n enabled: true,\n autoAllowBashIfSandboxed: true,\n },\n abortController: abortController,\n };\n\n // Add thinking configuration if enabled\n if (thinkingConfig) {\n options.thinking = thinkingConfig;\n }\n\n // Build prompt with previous context\n const prompt = promptBuilder.buildResumePrompt(feature, previousContext);\n\n // Use appropriate provider based on model type\n let currentQuery;\n if (isCodex) {\n // Validate that model string is actually a Codex model\n if (modelString.startsWith('claude-')) {\n console.error(`[FeatureExecutor] ERROR: Codex provider selected but Claude model string detected: ${modelString}`);\n throw new Error(`Invalid model configuration: Codex provider cannot use Claude model '${modelString}'. Please check feature model setting.`);\n }\n\n console.log(`[FeatureExecutor] Using Codex provider for resume with model: ${modelString}`);\n const provider = this.getProvider(feature);\n currentQuery = provider.executeQuery({\n prompt,\n model: modelString,\n cwd: projectPath,\n systemPrompt: promptBuilder.getVerificationPrompt(),\n maxTurns: 20,\n allowedTools: options.allowedTools,\n abortController: abortController,\n env: {\n OPENAI_API_KEY: process.env.OPENAI_API_KEY\n }\n });\n } else {\n // Use Claude SDK\n currentQuery = query({ prompt, options });\n }\n execution.query = currentQuery;"
|
||||
}Now let me verify the complete file is syntactically correct by reading key sections:
|
||||
🔧 Tool: Bash
|
||||
Input: {
|
||||
"command": "node -c app/electron/services/feature-executor.js 2>&1",
|
||||
"description": "Check JS syntax of feature-executor.js"
|
||||
}The syntax check passed (no output means no errors). Let me also verify the model-registry.js is correct:
|
||||
🔧 Tool: Bash
|
||||
Input: {
|
||||
"command": "node -c app/electron/services/model-registry.js 2>&1",
|
||||
"description": "Check JS syntax of model-registry.js"
|
||||
}Now let me verify the fix by reading the relevant parts of the file to ensure the logic is correct:
|
||||
🔧 Tool: Read
|
||||
Input: {
|
||||
"file_path": "/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js",
|
||||
"offset": 31,
|
||||
"limit": 50
|
||||
}The fix looks correct. Let me create a simple test script to verify the logic works correctly:
|
||||
🔧 Tool: Bash
|
||||
Input: {
|
||||
"command": "node -e \"\nconst { ModelRegistry } = require('./app/electron/services/model-registry.js');\n\n// Test Codex model detection\nconsole.log('Testing Codex model detection:');\nconsole.log('gpt-5.1-codex is Codex:', ModelRegistry.isCodexModel('gpt-5.1-codex'));\nconsole.log('gpt-5.1-codex-max is Codex:', ModelRegistry.isCodexModel('gpt-5.1-codex-max'));\nconsole.log('opus is Codex:', ModelRegistry.isCodexModel('opus'));\nconsole.log('haiku is Codex:', ModelRegistry.isCodexModel('haiku'));\n\nconsole.log('');\nconsole.log('Testing model string lookup:');\nconsole.log('gpt-5.1-codex string:', ModelRegistry.getModelString('gpt-5.1-codex'));\nconsole.log('gpt-5.1-codex-max string:', ModelRegistry.getModelString('gpt-5.1-codex-max'));\nconsole.log('opus string:', ModelRegistry.getModelString('opus'));\nconsole.log('haiku string:', ModelRegistry.getModelString('haiku'));\n\nconsole.log('');\nconsole.log('Testing getModel:');\nconst codexModel = ModelRegistry.getModel('gpt-5.1-codex');\nconsole.log('gpt-5.1-codex model:', codexModel ? codexModel.modelString : 'NOT FOUND');\n\"",
|
||||
"description": "Test model registry functions"
|
||||
}Excellent! The model registry is working correctly. Now let me test the feature-executor's `getModelString` method to make sure the fix works:
|
||||
🔧 Tool: Bash
|
||||
Input: {
|
||||
"command": "node -e \"\nconst featureExecutor = require('./app/electron/services/feature-executor.js');\n\nconsole.log('Testing getModelString with Codex features:');\nconsole.log('');\n\n// Test with Codex model\nconst codexFeature = { model: 'gpt-5.1-codex', description: 'Test' };\nconst codexResult = featureExecutor.getModelString(codexFeature);\nconsole.log('gpt-5.1-codex result:', codexResult);\nconsole.log('Expected: gpt-5.1-codex');\nconsole.log('Correct:', codexResult === 'gpt-5.1-codex');\n\nconsole.log('');\n\n// Test with Codex Max model\nconst codexMaxFeature = { model: 'gpt-5.1-codex-max', description: 'Test' };\nconst codexMaxResult = featureExecutor.getModelString(codexMaxFeature);\nconsole.log('gpt-5.1-codex-max result:', codexMaxResult);\nconsole.log('Expected: gpt-5.1-codex-max');\nconsole.log('Correct:', codexMaxResult === 'gpt-5.1-codex-max');\n\nconsole.log('');\n\n// Test with Claude model (should still work)\nconst claudeFeature = { model: 'opus', description: 'Test' };\nconst claudeResult = featureExecutor.getModelString(claudeFeature);\nconsole.log('opus result:', claudeResult);\nconsole.log('Expected: claude-opus-4-5-20251101');\nconsole.log('Correct:', claudeResult === 'claude-opus-4-5-20251101');\n\nconsole.log('');\n\n// Test with Haiku model\nconst haikuFeature = { model: 'haiku', description: 'Test' };\nconst haikuResult = featureExecutor.getModelString(haikuFeature);\nconsole.log('haiku result:', haikuResult);\nconsole.log('Expected: claude-haiku-4-5');\nconsole.log('Correct:', haikuResult === 'claude-haiku-4-5');\n\nconsole.log('');\nconsole.log('Summary:');\nconsole.log('All tests passed:', \n codexResult === 'gpt-5.1-codex' && \n codexMaxResult === 'gpt-5.1-codex-max' && \n claudeResult === 'claude-opus-4-5-20251101' &&\n haikuResult === 'claude-haiku-4-5'\n);\n\"",
|
||||
"description": "Test feature executor getModelString"
|
||||
}All tests pass. The fix is working correctly. Let me now update the feature status:
|
||||
🔧 Tool: mcp__automaker-tools__UpdateFeatureStatus
|
||||
Input: {
|
||||
"featureId": "feature-1765334243840-qmnc0ez5o",
|
||||
"status": "verified",
|
||||
"summary": "Fixed race condition in Codex model selection. Modified: feature-executor.js. The getModelString() method was incorrectly falling back to Claude opus model when Codex models were selected because it checked if modelString === modelKey (which is true for Codex). Fixed by checking isCodexModel() first and using the registry directly for Codex models. Also updated resumeFeatureWithContext() to properly use Codex provider when needed."
|
||||
}The feature has been implemented and marked for manual review. Here's a summary of what was fixed:
|
||||
|
||||
## Summary of Changes
|
||||
|
||||
**File Modified:** `app/electron/services/feature-executor.js`
|
||||
|
||||
### Problem
|
||||
When a Codex model (e.g., `gpt-5.1-codex`) was selected in the model tab, the `getModelString()` method was incorrectly returning the Claude opus model string (`claude-opus-4-5-20251101`) instead of the Codex model string.
|
||||
|
||||
### Root Cause
|
||||
The old `getModelString()` logic had this flow:
|
||||
1. Get `modelString` from `ModelRegistry.getModelString(modelKey)`
|
||||
2. If `modelString === modelKey`, fall back to `MODEL_MAP[modelKey]`
|
||||
3. If that's also empty, fall back to `MODEL_MAP.opus`
|
||||
|
||||
For Codex models, the registry returns the same string as the key (e.g., `'gpt-5.1-codex'` → `'gpt-5.1-codex'`), which triggered condition #2. Since `MODEL_MAP` only has Claude models, it returned `undefined`, triggering condition #3 which returned the Claude opus model.
|
||||
|
||||
### Fix
|
||||
1. **`getModelString()`**: Now checks `ModelRegistry.isCodexModel(modelKey)` first. If it's a Codex model, it directly looks up the model in the registry and returns its `modelString`. This avoids the problematic fallback logic.
|
||||
|
||||
2. **`resumeFeatureWithContext()`**: Also updated to properly use the Codex provider when resuming a feature with a Codex model, similar to how `implementFeature()` already does.
|
||||
|
||||
### Verification
|
||||
Tested the fix with a Node.js script that confirmed:
|
||||
- `gpt-5.1-codex` → returns `'gpt-5.1-codex'` ✓
|
||||
- `gpt-5.1-codex-max` → returns `'gpt-5.1-codex-max'` ✓
|
||||
- `opus` → returns `'claude-opus-4-5-20251101'` ✓
|
||||
- `haiku` → returns `'claude-haiku-4-5'` ✓
|
||||
✅ Verifying implementation for: So we added support for codex cli models but when we select them on model tab its still trying to use claude model there is some race condition in the code
|
||||
|
||||
1] [AutoMode] Running specific feature: feature-1765334118538-zc6n2ngu8
|
||||
[1] [AutoMode] Running feature: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureLoader] Created backup at /Users/shirone/Documents/Projekty/automaker/.automaker/feature_list.backup.json
|
||||
[1] [FeatureLoader] Updated feature feature-1765334118538-zc6n2ngu8: status=in_progress
|
||||
[1] [FeatureLoader] Successfully saved 13 features to feature_list.json
|
||||
[1] [FeatureExecutor] Implementing: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] Phase: PLANNING for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] getModelString: modelKey=gpt-5.1-codex, modelString=claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Using provider: Codex/OpenAI, model: claude-opus-4-5-20251101, thinking: none
|
||||
[1] [FeatureExecutor] Phase: ACTION for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task
|
||||
[1] [FeatureExecutor] ERROR: Codex provider selected but Claude model string detected: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Feature model: gpt-5.1-codex, modelString: claude-opus-4-5-20251101
|
||||
[1] [FeatureExecutor] Error implementing feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [FeatureExecutor] Error details: {
|
||||
[1] message: "Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.",
|
||||
[1] stack: "Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n" +
|
||||
[1] ' at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n' +
|
||||
[1] ' at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n' +
|
||||
[1] ' at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n' +
|
||||
[1] ' at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)',
|
||||
[1] name: 'Error',
|
||||
[1] code: undefined,
|
||||
[1] model: 'not initialized',
|
||||
[1] provider: 'unknown',
|
||||
[1] isCodex: 'unknown'
|
||||
[1] }
|
||||
[1] [AutoMode] Error running feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
[1] [IPC] auto-mode:run-feature error: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.
|
||||
[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)
|
||||
[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)
|
||||
[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12
|
||||
[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)
|
||||
|
||||
Verifying implementation and checking test results...
|
||||
✓ Verification successful: All tests passed
|
||||
|
||||
✅ Task completed: Let me read the model-registry.js file to understand how `getModelString` works there:Now I understand the issue! The problem is in `feature-executor.js` in the `getModelString` method. Let me trace through the logic:
|
||||
|
||||
1. When `modelKey = "gpt-5.1-codex"`, it calls `ModelRegistry.getModelString(modelKey)`
|
||||
2. In `model-registry.js`, `getModelString` looks up `MODELS[modelId]` and returns `model.modelString`
|
||||
3. However, looking at the flow more carefully, I see that `ModelRegistry.getModelString('
|
||||
@@ -142,19 +142,6 @@
|
||||
"model": "haiku",
|
||||
"thinkingLevel": "none"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765334243840-qmnc0ez5o",
|
||||
"category": "Core",
|
||||
"description": "So we added support for codex cli models but when we select them on model tab its still trying to use claude model there is some race condition in the code\n\n1] [AutoMode] Running specific feature: feature-1765334118538-zc6n2ngu8\n[1] [AutoMode] Running feature: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task\n[1] [FeatureLoader] Created backup at /Users/shirone/Documents/Projekty/automaker/.automaker/feature_list.backup.json\n[1] [FeatureLoader] Updated feature feature-1765334118538-zc6n2ngu8: status=in_progress\n[1] [FeatureLoader] Successfully saved 13 features to feature_list.json\n[1] [FeatureExecutor] Implementing: For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task\n[1] [FeatureExecutor] Phase: PLANNING for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task\n[1] [FeatureExecutor] getModelString: modelKey=gpt-5.1-codex, modelString=claude-opus-4-5-20251101\n[1] [FeatureExecutor] Using provider: Codex/OpenAI, model: claude-opus-4-5-20251101, thinking: none\n[1] [FeatureExecutor] Phase: ACTION for For example i got haiku model running or codex one but we can still see opus 4.5 check if it not hardcoded and fix it to use proper model name that was used in this task\n[1] [FeatureExecutor] ERROR: Codex provider selected but Claude model string detected: claude-opus-4-5-20251101\n[1] [FeatureExecutor] Feature model: gpt-5.1-codex, modelString: claude-opus-4-5-20251101\n[1] [FeatureExecutor] Error implementing feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)\n[1] [FeatureExecutor] Error details: {\n[1] message: \"Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\",\n[1] stack: \"Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\\n\" +\n[1] ' at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\\n' +\n[1] ' at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\\n' +\n[1] ' at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\\n' +\n[1] ' at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)',\n[1] name: 'Error',\n[1] code: undefined,\n[1] model: 'not initialized',\n[1] provider: 'unknown',\n[1] isCodex: 'unknown'\n[1] }\n[1] [AutoMode] Error running feature: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)\n[1] [IPC] auto-mode:run-feature error: Error: Invalid model configuration: Codex provider cannot use Claude model 'claude-opus-4-5-20251101'. Please check feature model setting.\n[1] at FeatureExecutor.implementFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/services/feature-executor.js:303:17)\n[1] at async AutoModeService.runFeature (/Users/shirone/Documents/Projekty/automaker/app/electron/auto-mode-service.js:142:22)\n[1] at async /Users/shirone/Documents/Projekty/automaker/app/electron/main.js:421:12\n[1] at async Session.<anonymous> (node:electron/js2c/browser_init:2:107280)\n",
|
||||
"steps": [],
|
||||
"status": "waiting_approval",
|
||||
"startedAt": "2025-12-10T02:37:26.038Z",
|
||||
"imagePaths": [],
|
||||
"skipTests": true,
|
||||
"summary": "Fixed race condition in Codex model selection. Modified: feature-executor.js. The getModelString() method was incorrectly falling back to Claude opus model when Codex models were selected because it checked if modelString === modelKey (which is true for Codex). Fixed by checking isCodexModel() first and using the registry directly for Codex models. Also updated resumeFeatureWithContext() to properly use Codex provider when needed.",
|
||||
"model": "opus",
|
||||
"thinkingLevel": "ultrathink"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765334441225-h3j832sbz",
|
||||
"category": "Kanban",
|
||||
@@ -206,36 +193,74 @@
|
||||
"model": "sonnet",
|
||||
"thinkingLevel": "none"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765360665626-u2vhr80aa",
|
||||
"category": "Uncategorized",
|
||||
"description": "I dont want you to change any code describe what u see in attached image",
|
||||
"steps": [],
|
||||
"status": "backlog",
|
||||
"startedAt": "2025-12-10T09:57:47.494Z",
|
||||
"imagePaths": [
|
||||
{
|
||||
"id": "img-1765360662146-d5qi79j88",
|
||||
"path": "/Users/shirone/Library/Application Support/automaker/images/1765360662144-2pt9bt1u4_image-test.png",
|
||||
"filename": "image-test.png",
|
||||
"mimeType": "image/png"
|
||||
}
|
||||
],
|
||||
"skipTests": true,
|
||||
"model": "gpt-5.1-codex",
|
||||
"thinkingLevel": "none"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765360739103-3h218d1nn",
|
||||
"category": "Kanban",
|
||||
"description": "When u write new feature for ai agent and attacht context images and change tab to choose diff model and go back to prompt tab the image preview break and im not sure if it even saved properly in state to be later attached check it out for me",
|
||||
"steps": [],
|
||||
"status": "waiting_approval",
|
||||
"status": "verified",
|
||||
"startedAt": "2025-12-10T09:59:02.988Z",
|
||||
"imagePaths": [],
|
||||
"skipTests": true,
|
||||
"summary": "Fixed image preview breaking when switching tabs in Add Feature modal. Added previewMap/onPreviewMapChange props to DescriptionImageDropZone component to lift preview state up to parent. Modified: description-image-dropzone.tsx (added parent-controlled state support), board-view.tsx (added newFeaturePreviewMap and followUpPreviewMap state, wired up to DescriptionImageDropZone). Image paths were already stored correctly in state - only the preview thumbnails (base64) were lost on tab switch due to component unmounting.",
|
||||
"model": "opus",
|
||||
"thinkingLevel": "high"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765363330908-vu0hip87r",
|
||||
"category": "Kanban",
|
||||
"description": "Take a look at waiting aproval column in kanban board and fix the card that render in it u can see in attached images that they text is overlaping check other columns how we have them",
|
||||
"steps": [],
|
||||
"status": "verified",
|
||||
"startedAt": "2025-12-10T10:46:42.494Z",
|
||||
"imagePaths": [
|
||||
{
|
||||
"id": "img-1765363296205-e4cwlj2j8",
|
||||
"path": "/Users/shirone/Library/Application Support/automaker/images/1765363296203-bud50snjv_SCR-20251210-kosr.png",
|
||||
"filename": "SCR-20251210-kosr.png",
|
||||
"mimeType": "image/png"
|
||||
},
|
||||
{
|
||||
"id": "img-1765363296214-lloeta38x",
|
||||
"path": "/Users/shirone/Library/Application Support/automaker/images/1765363296212-zg03hi120_SCR-20251210-kotn.png",
|
||||
"filename": "SCR-20251210-kotn.png",
|
||||
"mimeType": "image/png"
|
||||
},
|
||||
{
|
||||
"id": "img-1765363296221-oupa9su2f",
|
||||
"path": "/Users/shirone/Library/Application Support/automaker/images/1765363296219-7kndnuzr2_SCR-20251210-koud.png",
|
||||
"filename": "SCR-20251210-koud.png",
|
||||
"mimeType": "image/png"
|
||||
}
|
||||
],
|
||||
"skipTests": true,
|
||||
"model": "sonnet",
|
||||
"thinkingLevel": "low"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765365064255-wk51aoz3e",
|
||||
"category": "Core",
|
||||
"description": "I want to have some abbility when executing a task on project to have some type of rewing / checkpoint system so if the changes made by agent in the project dont satisfy me / break something i can click in the ui to revert them. The best way for it would be to implement github worktress so when spin up new task claude take a look at it generate new branch that fit task issue and make it as gihub worktree then we would create a a new folder in project .automaker/worktree with branch name and clone of repo so agent can freely work one something like that ",
|
||||
"steps": [],
|
||||
"status": "waiting_approval",
|
||||
"startedAt": "2025-12-10T11:11:06.115Z",
|
||||
"imagePaths": [],
|
||||
"skipTests": true,
|
||||
"summary": "Implemented Git Worktree Checkpoint/Revert System. Created: worktree-manager.js service. Modified: auto-mode-service.js (worktree integration, revert/merge methods), feature-loader.js (worktree tracking), main.js (IPC handlers), preload.js (API exposure), app-store.ts (Feature type), electron.d.ts (types), electron.ts (mock API), kanban-card.tsx (branch badge, revert/merge buttons), board-view.tsx (handlers). Features: isolated git branches per feature, branch badge on cards, revert changes button, merge to main button, file diff APIs.",
|
||||
"model": "opus",
|
||||
"thinkingLevel": "ultrathink"
|
||||
},
|
||||
{
|
||||
"id": "feature-1765365411551-87ww2zw6g",
|
||||
"category": "Kanban",
|
||||
"description": "When a agent is workig on task or when its in waiting approval column its would be nice to have some type of git diff panel and see what files got changed as well as reusing our custom themes we have in settings for the editor view of it take a look at codebase and create implementation for it",
|
||||
"steps": [],
|
||||
"status": "waiting_approval",
|
||||
"startedAt": "2025-12-10T11:16:54.069Z",
|
||||
"imagePaths": [],
|
||||
"skipTests": true,
|
||||
"summary": "Added git diff panel for in-progress and waiting approval features. Created GitDiffPanel component with themed syntax highlighting. Modified: git-diff-panel.tsx (new), agent-output-modal.tsx, worktree-manager.js, auto-mode-service.js, main.js, preload.js, electron.d.ts. The panel shows changed files with +/- stats and expandable unified diff view using CSS theme variables.",
|
||||
"model": "opus",
|
||||
"thinkingLevel": "ultrathink"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user