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
{{ message }}
Repository navigation
[cli-tools-test] logs tool fails in daily-cli-tools-tester: GH_TOKEN not available in agent runner #20434
The logs MCP tool consistently fails with exit status 1 when called from within the daily-cli-tools-tester workflow. All log download attempts fail regardless of parameters (count, start_date, workflow_name, engine filter, etc.).
Root Cause
The gh CLI is not authenticated because GH_TOKEN is not set in the agent runner's environment. The gh CLI requires GH_TOKEN to be explicitly set in GitHub Actions workflows:
gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
env:
GH_TOKEN: $\{\{ github.token }}
```
The `logs` tool internally calls `gh run list` which requires authentication.
### Steps to Reproduce
1. The `daily-cli-tools-tester` workflow runs (schedule-based)
2. Call the `agenticworkflows-logs` MCP tool with any parameters
3. Observe consistent failure:
```
MCP error -32603: calling "tools/call": failed to download workflow logs: exit status 1
Expected Behavior
The logs tool should successfully download workflow run logs when called from within a GitHub Actions workflow that has appropriate access.
Actual Behavior
All logs tool calls fail immediately with exit status 1. The underlying gh CLI command fails because GH_TOKEN is not configured in the agent environment.
Environment
Repository: github/gh-aw
Run ID: 22929477035
Workflow: daily-cli-tools-tester
gh version: 2.87.3 (2026-02-23)
gh-aw version: v0.23.0 (awf_version from aw_info.json)
Impact
Severity: High
Frequency: Always (100% failure rate in this workflow)
Workaround: None currently available via MCP interface
Suggested Fix
The daily-cli-tools-tester.md workflow (or its lock file) should add GH_TOKEN: $\{\{ github.token }} to the agent runner environment, or the agentic execution framework should automatically forward GITHUB_TOKEN as GH_TOKEN for agent jobs.
Diagnostics
Confirmed authentication is the root cause:
$ gh auth status
You are not logged into any GitHub hosts. To log in, run: gh auth login
$ env | grep GH_TOKEN
# (no output - GH_TOKEN not set)
$ env | grep GITHUB_TOKEN
# (no output - GITHUB_TOKEN not set)
Confirmed AWF_ONE_SHOT_TOKENS is present but GH_TOKEN/GITHUB_TOKEN are not set in the agent environment.
Activity