Skip to content

safe_outputs job: agent_output.json not found (nested artifact path) #21957

@Infinnerty

Description

@Infinnerty

Bug

The safe_outputs job in compiled workflows cannot find agent_output.json. The file exists at /tmp/gh-aw/gh-aw/agent_output.json (nested) but GH_AW_AGENT_OUTPUT is set to /tmp/gh-aw/agent_output.json.

Impact

PR review comments from the agent never land. The agent job succeeds, produces output, but safe_outputs logs:

Error reading agent output file: ENOENT: no such file or directory, open '/tmp/gh-aw/agent_output.json'
No agent output available - nothing to process

Evidence

# Setup step correctly finds the file at the nested path:
safe_outputs  Setup agent output  /tmp/gh-aw/gh-aw/agent_output.json

# But env var points to wrong path:
safe_outputs  Process Safe Outputs  GH_AW_AGENT_OUTPUT: /tmp/gh-aw/agent_output.json

# Result:
safe_outputs  Process Safe Outputs  Error reading agent output file: ENOENT

The download-artifact action extracts to /tmp/gh-aw/ but preserves the artifact internal directory structure, creating /tmp/gh-aw/gh-aw/ nesting.

Version

gh-aw v0.62.3 (latest), compiler v0.62.3

Workflow

agentic-code-review.md — Gemini-based PR code review agent. Affects all PRs — zero review comments land.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions