Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 160 additions & 179 deletions .github/workflows/daily-cli-performance.lock.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/daily-cli-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ permissions:
copilot-requests: write
tracker-id: daily-cli-performance
engine:
id: codex
id: copilot
model-provider: github
model: copilot/gpt-6-luna
tools:
Expand Down
329 changes: 154 additions & 175 deletions .github/workflows/daily-go-test-parallelizer.lock.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/daily-go-test-parallelizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
issues: read
pull-requests: read
engine:
id: codex
id: copilot
model-provider: github
model: copilot/gpt-5.6-terra
strict: true
Expand Down
328 changes: 154 additions & 174 deletions .github/workflows/issue-triage-agent.lock.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/issue-triage-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
emoji: "🔧"
timeout-minutes: 5
engine:
id: codex
id: copilot
model-provider: github
model: copilot/gpt-6-sol
strict: true
Expand Down
397 changes: 191 additions & 206 deletions .github/workflows/purelock.lock.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/purelock.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
pull-requests: read
copilot-requests: write
engine:
id: codex
id: copilot
model-provider: github
model: copilot/gpt-5.6-terra
strict: true
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/engines/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ GitHub inference requires the AWF sandbox. Do not set `sandbox.agent: false` for

GitHub inference disables Codex's native shell and JavaScript code-mode tools because the Copilot compatibility adapter does not support the custom `exec` tool. gh-aw generates a direct-tool model catalog from the installed Codex binary's bundled metadata, preserving the other model settings. This also disables code mode for models that select it independently of feature flags. MCP tools and the supported `apply_patch` tool remain available. The installed Codex command must support `debug models --bundled`; `engine.config` cannot re-enable these features or replace the managed catalog. OpenAI inference is unchanged.

Declaring `tools.bash` does not restore shell execution in this mode, and there is no MCP shell fallback. Workflows that need local commands, including CLI-proxy tools and the `safeoutputs` CLI, should use `engine: copilot` with GitHub inference, or Codex with OpenAI inference. Gateway tool registration alone does not establish that the agent can execute the CLI transport.

Recompile the workflow with `gh aw compile` and commit the changes to your repository. The workflow will now run with Codex as the AI engine.

## Example: scheduled repository report
Expand Down
51 changes: 51 additions & 0 deletions pkg/workflow/shell_workflow_engine_regression_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package workflow

import (
"os"
"path/filepath"
"runtime"
"testing"

"github.com/github/gh-aw/pkg/parser"
"github.com/stretchr/testify/require"
)

// GitHub-provider Codex disables native shell execution even when bash is
// declared. These workflows need shell access for task work or CLI transport.
func TestRecurringShellWorkflowsUseBashCapableEngine(t *testing.T) {
_, thisFile, _, ok := runtime.Caller(0)
require.True(t, ok)
repoRoot := filepath.Join(filepath.Dir(thisFile), "..", "..")

for _, name := range []string{
"daily-go-test-parallelizer",
"daily-cli-performance",
"purelock",
"issue-triage-agent",
} {
t.Run(name, func(t *testing.T) {
content, err := os.ReadFile(filepath.Join(repoRoot, ".github", "workflows", name+".md"))
require.NoError(t, err)
result, err := parser.ExtractFrontmatterFromContent(string(content))
require.NoError(t, err)
engineMap, ok := result.Frontmatter["engine"].(map[string]any)
require.True(t, ok, "workflow must declare its engine and inference provider")
require.Equal(t, "github", engineMap["model-provider"], "preserve GitHub inference")
engineID, ok := engineMap["id"].(string)
require.True(t, ok)
engine, err := GetGlobalEngineRegistry().GetEngine(engineID)
require.NoError(t, err)
require.True(t, engine.GetCapabilities().BashCommandAllowlist,
"%s requires a shell-capable GitHub inference engine; Codex disables its native shell in this mode", name)

tools, ok := result.Frontmatter["tools"].(map[string]any)
require.True(t, ok)
require.False(t, HasBashExplicitRestriction(tools), "required shell execution must not be disabled")
if name == "issue-triage-agent" {
require.Equal(t, true, tools["cli-proxy"], "triage uses shell-based CLI transport")
} else {
require.Contains(t, tools, "bash", "repository work requires declared shell access")
}
})
}
}
Loading