Conversation
…Y check Agent-Logs-Url: https://github.com/kimocoder/wifite2/sessions/1438d4a6-2a23-453f-961d-d03dda4e2b7d Co-authored-by: kimocoder <4252297+kimocoder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Claude workflow for enhanced robustness with missing credentials
fix: correct ANTHROPIC_API_KEY guard in Claude workflow (Apr 13, 2026
!= null → != '')
There was a problem hiding this comment.
Pull request overview
Adjusts the Claude GitHub Actions workflow guard so the Claude job is skipped when ANTHROPIC_API_KEY is unset/empty, preventing unnecessary calls to Anthropic (and the resulting “Credit balance is too low” failures) when credentials aren’t available.
Changes:
- Update the Claude job-level
ifcondition to checksecrets.ANTHROPIC_API_KEY != ''instead of!= null.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The Claude job's
ifcondition used!= nullto check for the API key, but GitHub Actions evaluates unset secrets as''(empty string), notnull. This made the guard a no-op — the job always ran, hitting the Anthropic backend and failing with "Credit balance is too low."Changes
.github/workflows/claude.yml— fix job-level condition:The existing
continue-on-error: trueon the Claude step remains as a second line of defence for cases where the secret is present but the account has insufficient credits.Original prompt
The GitHub Actions workflow in
kimocoder/wifite2is failing in the Claude Code job. The failing workflow file is.github/workflows/claude.yml.Observed failure from logs:
anthropics/claude-code-action@v1step fails withClaude Code returned an error result: Credit balance is too low.Task:
kimocoder/wifite2that updates.github/workflows/claude.ymlto make this workflow more robust when Anthropic credentials are unavailable or unusable.Suggested direction:
secrets.ANTHROPIC_API_KEYis present.Acceptance criteria:
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Fix the workflow issue from logs
Assistant: I’ve identified the failure and submitted the workflow change; once you respond to the pending confirmation dialog, I can continue and verify the result.
User: @copilot Accepted Confirmation: Are you sure?
Assistant: The workflow itself isn’t broken by YAML syntax — it’s failing because the Claude action is actually running and the backend returns “Credit balance is too low.”
Root cause
anthropics/claude-code-action@v1.Claude Code returned an error result: Credit balance is too low.claude/issue-484-20260413-2136are secondary: the branch was never created because the action failed first.What to fix
You have two practical options:
Fund / replace the Anthropic API key in
ANTHROPIC_API_KEYGuard or disable the workflow so it doesn’t fail when credits are unavailable
Recommended workflow change
Add a job-level guard so the job only runs when the secret exists, and optionally make the workflow manual-only if you don’t want comment-triggered failures.
Your current file:
Suggested minimal change: