Skip to content
Merged
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
79 changes: 15 additions & 64 deletions docs/src/content/docs/troubleshooting/common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,14 @@ If your workflow fails during the Copilot inference step even though the `COPILO

**Symptoms**: The workflow fails with authentication or quota errors when the Copilot CLI tries to generate a response.

**Diagnosis**: Verify that the account associated with the `COPILOT_GITHUB_TOKEN` can successfully run inference by testing it locally.
**Diagnosis**: Test locally by installing the [Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli) and running:

1. Install the Copilot CLI locally by following the [GitHub Copilot CLI documentation](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli).

2. Export the token as an environment variable:

```bash
export COPILOT_GITHUB_TOKEN="<your-github-pat>"
```

3. Run a simple inference test:

```bash
copilot -p "write a haiku"
```
```bash
export COPILOT_GITHUB_TOKEN="<your-github-pat>"
copilot -p "write a haiku"
```

If this command fails, the account associated with the token does not have a valid Copilot license or inference access. Contact your organization administrator to verify that the token owner has an active Copilot subscription with inference enabled.
If this fails, the token owner lacks a valid Copilot license or inference access. Contact your organization administrator to enable it.
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Contact your organization administrator to enable it" is ambiguous (what exactly needs enabling: a Copilot seat/license assignment, policy allowance, or inference access). Consider naming the specific action(s) the admin should take so readers know what to ask for.

Suggested change
If this fails, the token owner lacks a valid Copilot license or inference access. Contact your organization administrator to enable it.
If this fails, the token owner lacks a valid Copilot license or inference access. Contact your organization administrator to assign a GitHub Copilot license to the token owner and enable Copilot inference access for your organization.

Copilot uses AI. Check for mistakes.

> [!NOTE]
> The `COPILOT_GITHUB_TOKEN` must belong to a user account with an active GitHub Copilot subscription. Organization-managed Copilot licenses may have additional restrictions on programmatic API access.
Expand Down Expand Up @@ -511,23 +502,15 @@ See [Integrity Filtering](/gh-aw/reference/integrity/) for details.

### Workflow Job Timed Out

When a workflow job exceeds its configured time limit, GitHub Actions marks the run as `timed_out`. The failure tracking issue or comment posted by gh-aw will include a message indicating the timeout and a suggestion:

```yaml wrap
---
timeout-minutes: 30 # Increase from the previous value
---
```

If no `timeout-minutes` value is set in your workflow frontmatter, the default is 20 minutes. To increase the limit:
When a workflow job exceeds its time limit, GitHub Actions marks the run as `timed_out`. The default is 20 minutes. Increase it with:
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence "The default is 20 minutes" is ambiguous and can read as the GitHub Actions platform default (which is different). Consider clarifying that this is the gh-aw / workflow frontmatter default for the agent execution job (and that other/custom jobs may use the GitHub Actions default unless explicitly set).

Suggested change
When a workflow job exceeds its time limit, GitHub Actions marks the run as `timed_out`. The default is 20 minutes. Increase it with:
When a workflow job exceeds its time limit, GitHub Actions marks the run as `timed_out`. For gh-aw–compiled workflows, the default timeout for the agent execution job (set in the workflow frontmatter) is 20 minutes; other or custom jobs use the GitHub Actions default unless you set `timeout-minutes` explicitly. Increase it with:

Copilot uses AI. Check for mistakes.

```yaml wrap
---
timeout-minutes: 60
---
```

Recompile with `gh aw compile` after updating. If the workflow is consistently timing out, consider reducing the scope of the task or breaking it into smaller, focused workflows.
Recompile with `gh aw compile` after updating. If timeouts persist, reduce the task scope or split into smaller workflows.

### Why Did My Workflow Fail?

Expand Down Expand Up @@ -564,49 +547,17 @@ Enable verbose mode (`--verbose`), set `ACTIONS_STEP_DEBUG = true`, check MCP co

### Enable Debug Logging

The `DEBUG` environment variable activates detailed internal logging for any `gh aw` command. This reveals what the CLI is doing internally — compilation steps, MCP setup, tool configuration, and more.

**Enable all debug logs:**

```bash
DEBUG=* gh aw compile
```

**Enable logs for a specific package:**
The `DEBUG` environment variable activates detailed internal logging for any `gh aw` command:

```bash
DEBUG=cli:* gh aw audit 123456
DEBUG=workflow:* gh aw compile my-workflow
DEBUG=parser:* gh aw compile my-workflow
DEBUG=* gh aw compile # all logs
DEBUG=workflow:* gh aw compile my-workflow # specific package
DEBUG=workflow:*,cli:* gh aw compile my-workflow # multiple packages
DEBUG=*,-workflow:test gh aw compile my-workflow # exclude a logger
DEBUG_COLORS=0 DEBUG=* gh aw compile 2>&1 | tee debug.log # capture to file
```

**Enable logs for multiple packages at once:**

```bash
DEBUG=workflow:*,cli:* gh aw compile my-workflow
```

**Exclude specific loggers:**

```bash
DEBUG=*,-workflow:test gh aw compile my-workflow
```

**Disable colors (useful when piping output):**

```bash
DEBUG_COLORS=0 DEBUG=* gh aw compile my-workflow 2>&1 | tee debug.log
```

> [!TIP]
> Debug output goes to `stderr`. Pipe with `2>&1 | tee debug.log` to capture it to a file while still seeing it in your terminal.

Each log line shows:
- **Namespace** – the package and component that emitted it (e.g., `workflow:compiler`)
- **Message** – what the CLI was doing at that moment
- **Time elapsed** – time since the previous log entry (e.g., `+125ms`), which helps identify slow steps

Log namespaces follow a `pkg:filename` convention. Common namespaces include `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, and `parser:frontmatter`. Wildcards (`*`) match any suffix, so `workflow:*` captures all workflow-package logs.
Debug output goes to `stderr`. Each log line shows the namespace (`workflow:compiler`), message, and time elapsed since the previous entry. Common namespaces: `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, `parser:frontmatter`. Wildcards match any suffix (`workflow:*`).
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"time elapsed since the previous entry" is slightly misleading: the logger implementation tracks the delta per namespace/logger instance (time since the previous log from that namespace), not necessarily since the previous log line overall. Consider tweaking the wording to avoid implying a global delta.

Suggested change
Debug output goes to `stderr`. Each log line shows the namespace (`workflow:compiler`), message, and time elapsed since the previous entry. Common namespaces: `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, `parser:frontmatter`. Wildcards match any suffix (`workflow:*`).
Debug output goes to `stderr`. Each log line shows the namespace (`workflow:compiler`), message, and time elapsed since the previous log from that namespace (not necessarily the previous log line overall). Common namespaces: `cli:compile_command`, `workflow:compiler`, `workflow:expression_extraction`, `parser:frontmatter`. Wildcards match any suffix (`workflow:*`).

Copilot uses AI. Check for mistakes.

## Operational Runbooks

Expand Down
Loading