Debugging Copilot Workflows
This guide explains how to debug and troubleshoot Copilot automation workflows using uploaded artifacts.
Overview
All copilot-exec workflows automatically upload their execution logs as artifacts. These logs provide valuable insights into:
- AI decision-making processes
- Prompt rendering and execution
- Error messages and stack traces
- Automation behavior and outcomes
Accessing Artifacts
Via GitHub Actions UI
- Navigate to Actions tab in the repository
- Select the workflow run you want to inspect
- Scroll to the Artifacts section at the bottom of the run summary
- Click on the artifact name to download
Via GitHub CLI
1 | # List artifacts for a specific run |
Artifact Naming Convention
Artifacts follow a consistent naming pattern:
| Workflow | Artifact Name Pattern |
|---|---|
| Strategic Planner | strategic-planner-report-{run_id} |
| Issue Triage | issue-triage-logs-{issue_number}-{run_id} |
| Repository Audit | repository-audit-logs-{run_id} |
| Todo PR | todo-issue-logs-{issue_number}-{run_id} |
| Todo Daily | todo-daily-prioritization-logs-{run_id} |
| Email Triage | email-triage-logs-{run_id} |
| Changelog to Blog | changelog-to-blog-logs-{version} |
Log Contents
Each log file contains:
- Prompt: The rendered prompt sent to Copilot CLI
- Response: Full Copilot CLI output
- Timestamps: Execution timing information
- Errors: Any error messages or failures
Retention Policy
Artifacts are retained for 30 days to balance:
- Storage costs
- Debugging utility
- Audit trail requirements
After 30 days, artifacts are automatically deleted by GitHub.
Troubleshooting Common Issues
Empty or Missing Logs
If the artifact is empty or missing:
- Check if the workflow step failed before log generation
- Verify the
output-pathparameter in the copilot-exec step - Review the workflow run logs for errors
Cache Hit (No Fresh Response)
If Copilot returns a cached response:
- Set
force-response: truein the copilot-exec step - Or modify the prompt to generate a new cache key
Timeout Errors
If the workflow times out:
- Increase the
timeoutparameter in copilot-exec - Review the log for slow operations
- Check MCP server connectivity
Workflows with Artifact Upload
The following workflows upload copilot-exec logs:
copilot-strategic-planner.yml- Strategic analysis reportscopilot-issue-triage.yml- Issue triage decisionscopilot-review.yml- Repository audit findingscopilot-todo-pr.yml- Implementation progresscopilot-todo-daily.yml- Daily prioritizationcopilot-email-triage.yml- Email processingcopilot-changelog-to-blog.yml- Blog post generation
Best Practices
- Download artifacts promptly - Before the 30-day retention expires
- Use verbose mode - Set
verbose: "true"for detailed logging - Check related artifacts - Multiple workflows may have related logs
- Compare with successful runs - Diff against working workflow runs