Repository navigation
Show Claude error in review workflow log on failure - #1587
Merged
Merged
Conversation
claude-code-action hides Claude's output on public repos, so a failed review only says "result is_error:true". On failure, print the API/SDK error and the final result text from the execution file, plus a job annotation, without exposing the transcript. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The first real run of
claude-review.yml(run 44572683228, PR #1586) failed with only this:claude-code-actionhides Claude's output on public repos (show_full_output: false), and debug mode didn't reveal it either. The failure took 0.7 s with $0 cost and no tokens, so the API rejected the very first request: likely the key, credit/spend limit, or model access. The actual error text never reaches the log.This PR adds one step that runs only when the review fails:
It prints only the error fields from the action's execution file, never the transcript, tool results or Jira content.
Evidence
Ran the step's script locally on a fake execution file:
Also checked: a max-turns result prints
Reached maximum number of turns (40), and an empty file prints nothing and exits 0. The workflow YAML parses.Not tested on GitHub yet: the action skips itself on a PR that changes its own workflow file (it must match
main), so this only takes effect once merged. The next PR that triggers a review will then show the actual API error.Merge Danger
Door: two-way. Revert to remove the step.
Blast Radius: failed-run logs.
🤖 Generated with Claude Code