Skip to content

[smoke-outpost] 🔍 Smoke Test Investigation - Smoke OpenCode: Missing agent_output.json File #2121

@github-actions

Description

@github-actions

Summary

The Smoke OpenCode workflow failed because the create_issue job could not find the expected agent_output.json file. The agent job completed successfully, but did not create the safe-outputs file that the downstream job expected.

Failure Details

  • Run: #18715612738
  • Commit: ecbbe48
  • Trigger: schedule
  • Duration: 1.2 minutes
  • Failed Job: create_issue (5s duration)

Root Cause Analysis

Primary Error

Error reading agent output file: ENOENT: no such file or directory, open '/tmp/gh-aw/safe-outputs/agent_output.json'

Investigation Findings

The workflow execution shows:

  1. activation job succeeded (4s)
  2. agent job succeeded (19s)
  3. detection job succeeded (14s)
  4. create_issue job failed (5s)

The create_issue job expects to read from /tmp/gh-aw/safe-outputs/agent_output.json, but this file was not created by the agent job. This suggests one of two scenarios:

Scenario A: The agent completed its task without requesting any safe-output actions (issue creation, etc.), so no output file was generated.

Scenario B: There was an issue with the safe-outputs mechanism that prevented the file from being written despite the agent job succeeding.

Environment Context

  • Staged Mode: Enabled (GH_AW_SAFE_OUTPUTS_STAGED: true)
  • Workflow: Smoke OpenCode
  • Agent Output Path: /tmp/gh-aw/safe-outputs/agent_output.json

Failed Jobs and Errors

create_issue Job

  • Status: Failed
  • Conclusion: failure
  • Duration: 5 seconds
  • Error: File not found when attempting to read agent output

The job attempted to read the agent output file to process any issue creation requests, but the file did not exist.

Recommended Actions

  • HIGH PRIORITY: Review the agent job logs from run #18715612738 to determine if the agent attempted to use safe-outputs tools
  • HIGH PRIORITY: Verify the safe-outputs mechanism is working correctly in the Smoke OpenCode workflow
  • HIGH PRIORITY: Check if the OpenCode agent has the proper configuration to write to /tmp/gh-aw/safe-outputs/
  • MEDIUM PRIORITY: Make the create_issue job conditional - only run when agent_output.json exists
  • MEDIUM PRIORITY: Add graceful handling in create_issue job when the output file is missing (skip instead of fail)
  • LOW PRIORITY: Add debug logging to confirm safe-outputs file creation in the agent job

Prevention Strategies

  1. Conditional Job Execution: Use GitHub Actions conditionals to only run create_issue when the agent output file exists:

    if: hashFiles('/tmp/gh-aw/safe-outputs/agent_output.json') != ''
  2. Graceful Degradation: Modify the create_issue job to check for file existence and log a message instead of failing when the file is missing

  3. Validation Step: Add an intermediate job that validates the agent output and sets outputs for downstream jobs to use in conditionals

  4. Enhanced Logging: Add logging in the agent job to explicitly confirm when safe-outputs files are created

Historical Context

This is a new failure pattern. Previous audit data from /tmp/gh-aw/cache-memory/ shows no similar failures with missing agent_output.json files. The pattern database shows other error types (permission denied, authentication issues, detection failures) but not this specific issue.

The smoke test workflows have been generally stable, with most recent failures being related to:

  • Permission issues with GitHub MCP tools
  • Authentication failures in workflow_run triggers
  • Detection job failures

This represents a new category of failure related to the safe-outputs mechanism.

Related Information

  • Commit: The failure occurred on commit ecbbe48 which added "scheduling best practices guidance for daily workflows"
  • Job Sequence: All upstream jobs (activation, agent, detection) completed successfully
  • Safe-Outputs: The workflow has staging mode enabled, which should preview actions without executing them

Labels: smoke-test, investigation, safe-outputs, configuration

AI generated by Smoke Outpost - Smoke Test Failure Investigator

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions