diff --git a/pkg/workflow/codex_engine.go b/pkg/workflow/codex_engine.go index 97106544cbb..e6d22af8d0d 100644 --- a/pkg/workflow/codex_engine.go +++ b/pkg/workflow/codex_engine.go @@ -69,10 +69,6 @@ func (e *CodexEngine) GetInstallationSteps(workflowData *WorkflowData) []GitHubA " - name: Install Codex", fmt.Sprintf(" run: %s", installCmd), }, - { - " - name: Authenticate with Codex", - " run: codex login --api-key \"${{ secrets.OPENAI_API_KEY }}\"", - }, } } @@ -111,6 +107,15 @@ export CODEX_HOME=/tmp/mcp-config # Create log directory outside git repo mkdir -p /tmp/aw-logs +# where is Codex +which codex + +# Check Codex version +codex --version + +# Authenticate with Codex +codex login --api-key "${{ secrets.OPENAI_API_KEY }}" + # Run codex with log capture - pipefail ensures codex exit code is preserved codex exec %s%s--full-auto "$INSTRUCTION" 2>&1 | tee %s`, modelParam, searchParam, logFile) diff --git a/pkg/workflow/codex_engine_test.go b/pkg/workflow/codex_engine_test.go index 4f9ed6d4917..5fc1065a6cf 100644 --- a/pkg/workflow/codex_engine_test.go +++ b/pkg/workflow/codex_engine_test.go @@ -27,7 +27,7 @@ func TestCodexEngine(t *testing.T) { // Test installation steps steps := engine.GetInstallationSteps(&WorkflowData{}) - expectedStepCount := 3 // Setup Node.js, Install Codex, and Authenticate with Codex + expectedStepCount := 2 // Setup Node.js, Install Codex if len(steps) != expectedStepCount { t.Errorf("Expected %d installation steps, got %d", expectedStepCount, len(steps)) }