Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

The Code Scanning Fixer workflow failed with missing finish_reason for choice 0 despite successfully finding no alerts to fix. This transient Copilot API error occurred after the agent completed its work, causing spurious failure tracking issues.

Changes

  • Added explicit success signaling: Require agent to call noop tool when no alerts are found
  • Updated error handling: Changed from implicit "exit gracefully" to explicit noop(message="...") calls
  • Added documentation: Explain that noop signals persist even if CLI fails afterward

Why this works

The safe output system captures noop calls independently of CLI completion. When the API fails mid-response, the previously recorded noop signal indicates successful completion, preventing false failure reports.

Before:

- If no unfixed high severity alerts remain, exit gracefully with message: "..."

After:

- If no unfixed high severity alerts remain:
  - **MUST** call `noop(message="No unfixed high severity alerts found...")`
  - This signals successful completion and prevents transient API errors from being reported as failures
  - Exit gracefully

The workflow now distinguishes between genuine failures (agent couldn't complete work) and transient API errors (agent completed work, CLI failed afterward).

Original prompt

This section details on the original issue you should resolve

<issue_title>[agentics] Code Scanning Fixer failed</issue_title>
<issue_description>### Workflow Failure

Workflow: Code Scanning Fixer
Branch: main
Run URL: https://github.com/githubnext/gh-aw/actions/runs/21126053891

Action Required

Debug this workflow failure using the agentic-workflows agent:

/agent agentic-workflows

When prompted, instruct the agent to debug this workflow failure.

Generated from Code Scanning Fixer

  • expires on Jan 26, 2026, 5:11 AM UTC

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 20, 2026 03:33
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
When no high severity alerts are found, the agent correctly reports success
but may encounter transient Copilot API errors like "missing finish_reason".
Now explicitly require using the noop tool to signal successful completion,
which prevents these transient errors from being reported as workflow failures.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug workflow failure in Code Scanning Fixer Require explicit noop signal in Code Scanning Fixer to prevent false failures on API errors Jan 20, 2026
@pelikhan
Copy link
Contributor

@copilot format, lint

Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@pelikhan Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 5d597c78-c1d0-4d6d-8b6d-793282545f33

Sorry for the inconvenience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agentics] Code Scanning Fixer failed

3 participants