Fix Smoke OpenCode workflow failure and update to version 0.15.13 #2127
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
The Smoke OpenCode workflow (run #18715612738) was failing because the
create_issuejob couldn't find the expectedagent_output.jsonfile. Investigation revealed that the agent job appeared to succeed but didn't actually execute the OpenCode agent, resulting in no safe-outputs file being generated.Root Cause
The OpenCode shared configuration in
.github/workflows/shared/opencode.mdwas using version 0.1.0 with CLI flags that weren't supported:OpenCode CLI version 0.1.0 doesn't support
--modelor--no-tuiflags. When these invalid flags were passed, OpenCode displayed usage help and exited with code 0 (a bug in the OpenCode CLI itself). This caused the GitHub Actions step to succeed despite OpenCode never actually running.From the workflow logs:
Solution
1. Updated to OpenCode 0.15.13
Updated from version 0.1.0 to 0.15.13 (latest), which now properly supports the
--modelflag. The new version allows us to:--modelflagAfter (v0.15.13):
2. Updated Documentation
0.1.0to0.15.13--modelflag is now supported in the latest versionImpact
The workflow will now:
--modelflag supportThis eliminates the previous silent failure mode where the agent job would succeed without actually running the agent.
Testing
--modelflagFixes #2121
Original prompt
This section details on the original issue you should resolve
<issue_title>[smoke-outpost] 🔍 Smoke Test Investigation - Smoke OpenCode: Missing agent_output.json File</issue_title>
<issue_description>## Summary
The Smoke OpenCode workflow failed because the
create_issuejob could not find the expectedagent_output.jsonfile. The agent job completed successfully, but did not create the safe-outputs file that the downstream job expected.Failure Details
Root Cause Analysis
Primary Error
Investigation Findings
The workflow execution shows:
The
create_issuejob 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
GH_AW_SAFE_OUTPUTS_STAGED: true)/tmp/gh-aw/safe-outputs/agent_output.jsonFailed Jobs and Errors
create_issue Job
The job attempted to read the agent output file to process any issue creation requests, but the file did not exist.
Recommended Actions
/tmp/gh-aw/safe-outputs/create_issuejob conditional - only run whenagent_output.jsonexistscreate_issuejob when the output file is missing (skip instead of fail)Prevention Strategies
Conditional Job Execution: Use GitHub Actions conditionals to only run
create_issuewhen the agent output file exists:Graceful Degradation: Modify the
create_issuejob to check for file existence and log a message instead of failing when the file is missingValidation Step: Add an intermediate job that validates the agent output and sets outputs for downstream jobs to use in conditionals
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 missingagent_output.jsonfiles. 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:
This represents a new category of failure related to the safe-outputs mechanism.
Related Information
Labels: smoke-test, investigation, safe-outputs, configuration
Comments on the Issue (you are @copilot in this section)
@pelikhan @copilot diff smoke codex and smoke Claude to determine the potential root cause of this issue. Investigate the run output.Fixes #2121
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.