mysql / mysql/mysql-server

[aw] Codex PR Review exceeded daily AI credits budget

Open
#765 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agentic-workflows
Dominant language
C++
Stars
12.4k
Forks
4.4k
Avg merge
8d 16h
Merged PRs (30d)
1

Description

Workflow Failure

Workflow: Codex PR Review
Branch: clang23-26.7.0
Run: https://github.com/mysql/mysql-server/actions/runs/35241283222
Pull Request: #764

[!WARNING]
Daily Workflow AIC Guardrail Exceeded: The agent was not started because this workflow has already consumed the configured 24-hour AI Credits budget.

  • 24h AIC usage: 6.4K AI Credits
  • Configured threshold: 5K AI Credits

The agent will resume automatically once the 24-hour rolling window resets. No action is required if the current limit is appropriate for your usage.

AIC values are approximate. Consult the billing dashboards for accurate usage and charges.

How to raise the daily limit

Set max-daily-ai-credits in your workflow frontmatter to a higher value, then recompile:

max-daily-ai-credits: 20K

Common suffix shorthands: K = thousands, M = millions (e.g. 2M = 2,000,000).

After editing the workflow source file, regenerate the compiled lock file:

gh aw compile

Commit and push the updated .lock.yml file.

[!NOTE]
Raising the limit increases the number of AI inference calls the workflow can make
per 24-hour window. Review your Copilot or model provider billing
before significantly increasing the threshold (for example, before doubling the current
value or setting it far above expected usage).

What is the daily AI Credits guardrail?

The max-daily-ai-credits frontmatter option sets a per-workflow spending cap measured in AI Credits across the 24-hour window before the current run. The cap is scoped to the repository and workflow — it aggregates usage across all runs of this workflow regardless of who triggered them.

When the aggregated AI Credits usage across all completed runs of this workflow in the last 24 hours exceeds the threshold, the activation job sets the daily_ai_credits_exceeded output to true and the agent job is skipped for that run. The conclusion job still runs and creates this report.

The guardrail is evaluated at activation time, not retrospectively, so a single very large run that pushes usage over the threshold only blocks subsequent runs in the same window — it does not cancel a run that is already in progress.

How to disable this guardrail

[!CAUTION]
Disabling this guardrail removes the per-workflow spending cap. Only disable it if you have
an alternative mechanism for controlling AI cost usage or if the workflow is intentionally
uncapped.

Set max-daily-ai-credits: -1 in the workflow frontmatter to explicitly disable the guardrail, then recompile:

max-daily-ai-credits: -1
gh aw compile

Alternatively, remove the max-daily-ai-credits key entirely to fall back to the enterprise-wide default (if one is configured) or to run with no per-workflow cap.

Action Required

Assign this issue to an agent to debug and fix the issue.

Optimize token consumption

This failure was triggered by a guardrail limit (max-daily-ai-credits). Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.) to analyze token usage and reduce costs:

Optimize the agentic workflow token consumption using https://raw.githubusercontent.com/github/gh-aw/main/optimize.md

The workflow run is at https://github.com/mysql/mysql-server/actions/runs/35241283222
Debug with any coding agent

Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):

Debug the agentic workflow failure using https://raw.githubusercontent.com/github/gh-aw/main/debug.md

The failed workflow run is at https://github.com/mysql/mysql-server/actions/runs/35241283222
Manually invoke the agent

Debug this workflow failure using your favorite Agent CLI and the agentic-workflows prompt.

[!TIP]

Stop reporting this workflow as a failure

To stop a workflow from creating failure issues, set report-failure-as-issue: false in its frontmatter:

safe-outputs:
  report-failure-as-issue: false

Generated from Codex PR Review ·

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/codex-pr-review.md and the failed run for branch clang23-26.7.0, then review the generated workflow output and the agentic-workflows skill guidance. Done means the Codex PR Review workflow no longer exceeds its configured daily AI credits budget during the reported scenario and the workflow completes as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.