You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where `{NUMBER}` is replaced with **only the numeric issue number** (e.g., `1896`). Do NOT include the repository name, hash symbols, or any other text — just the number in the URL path. Use the `add_comment` safe output tool with `repo: "github/gh-aw"` and the original issue number.
87
86
87
+
where `{NUMBER}` is replaced with **only the numeric issue number** (e.g., `1896`). Do NOT include the repository name, hash symbols, or any other text — just the number in the URL path. Use the `add_comment` safe output tool with `repo: "github/gh-aw"` and the original issue number.
## `COPILOT_GITHUB_TOKEN` and Classic PAT Compatibility
92
+
93
+
When `COPILOT_GITHUB_TOKEN` is set in the host environment, AWF injects it into the agent container so the Copilot CLI can authenticate against the GitHub Copilot API.
94
+
95
+
### ⚠️ Classic PAT + `COPILOT_MODEL` Incompatibility (Copilot CLI 1.0.21+)
96
+
97
+
Copilot CLI 1.0.21 introduced a startup model validation step: when `COPILOT_MODEL` is set, the CLI calls `GET /models` before executing any task. **This endpoint does not accept classic PATs** (`ghp_*` tokens), causing the agent to fail at startup with exit code 1 — before any useful work begins.
98
+
99
+
**Affected combination:**
100
+
-`COPILOT_GITHUB_TOKEN` is a classic PAT (prefixed with `ghp_`)
101
+
-`COPILOT_MODEL` is set in the agent environment (e.g., via `--env COPILOT_MODEL=...`, `--env-file`, or `--env-all`)
102
+
103
+
**Unaffected:** Workflows that do not set `COPILOT_MODEL` are not affected — the `/models` validation is only triggered when `COPILOT_MODEL` is set.
104
+
105
+
**AWF detects this combination at startup** and emits a `[WARN]` message:
106
+
```
107
+
⚠️ COPILOT_MODEL is set with a classic PAT (ghp_* token)
108
+
Copilot CLI 1.0.21+ validates COPILOT_MODEL via GET /models at startup.
109
+
Classic PATs are rejected by this endpoint — the agent will likely fail with exit code 1.
110
+
Use a fine-grained PAT or OAuth token, or unset COPILOT_MODEL to skip model validation.
111
+
```
112
+
113
+
**Remediation options:**
114
+
1. Replace the classic PAT with a **fine-grained PAT** or **OAuth token** (these are accepted by the `/models` endpoint).
115
+
2. Remove `COPILOT_MODEL` from the agent environment to skip model validation entirely.
116
+
91
117
## Internal Environment Variables
92
118
93
119
The following environment variables are set internally by the firewall and used by container scripts:
0 commit comments