Fix empty GITHUB_AW_AGENT_OUTPUT in safe output jobs#1864
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add artifact download steps to buildGitHubScriptStep - Change from using job outputs to artifact-based approach - Update GITHUB_AW_AGENT_OUTPUT to read from env instead of job outputs - Update tests to reflect new artifact download behavior - Recompile all workflows with new artifact download steps Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate empty GH_AW_ACTION_OUTPUT in create-issue
Fix empty GITHUB_AW_AGENT_OUTPUT in safe output jobs
Oct 17, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Safe output jobs (create-issue, add-comment, create-pull-request, etc.) were failing silently because the
GITHUB_AW_AGENT_OUTPUTenvironment variable was empty. This caused JavaScript scripts to exit early without processing agent output.The issue was observed in workflow run #18596819745 where the create-issue job logged:
Root Cause
GitHub Actions was masking the job output with the message:
Safe output jobs were attempting to read agent output using:
This resulted in an empty value because GitHub Actions security features prevent outputs that might contain sensitive data from being passed between jobs.
Solution
Modified safe output jobs to download the
agent_output.jsonartifact that's already uploaded by the agent job, following the same pattern used by custom safe-jobs:Before:
After:
Changes
buildGitHubScriptStep()inpkg/workflow/safe_output_helpers.goto add artifact download steps before GitHub Script executionbuildAgentOutputDownloadSteps()helper function that generates the download and environment setup stepsImpact
Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.