[aw] Auto-Triage Issues: exceeded daily AI credits budget

未关闭 适合新手
#83,095 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, yaml
领域
ci-cd, devops

调研方向

从 .github/workflows/auto-triage-issues.md 和关联的工作流运行开始,确定为何达到 10K 防护阈值。检查已配置的 max-daily-ai-credits 以及尚未解决的使用量核算,然后进行针对性的配置更改。运行 gh aw compile 并提交重新生成的锁文件;错误不应再报告超过每日防护阈值。

由索引模型根据 Issue 内容生成。

描述

agentic-workflows
What happened

Auto-Triage Issues exceeded daily AI credits budget.

View run #46767536670 · Workflow source · Previous failures

Branch: main

Next step

Review the failure details below for a targeted fix, or assign this issue to a coding agent to investigate. If an agentic threat is detected, complete manual review before assigning or using any follow-up automation.

Failure details

[!WARNING]
Daily Workflow AIC Guardrail Exceeded: The agent was not started because the 24-hour guardrail total reached the configured AI Credits threshold.

  • 24h AIC guardrail total: 14K AI Credits
  • Recorded AIC: 0 AI Credits
  • Estimated AIC (unresolved accounting): 14K AI Credits
  • Configured threshold: 10K AI Credits

Estimated credits represent conservative per-run maximums where accounting is unavailable, not confirmed consumption. Subsequent scans retry unresolved accounting and replace estimates if recorded usage becomes available. Otherwise, these estimates stop counting when the affected runs leave the rolling 24-hour window.

Recorded AIC values are approximate; estimates are not measured consumption. 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 total of recorded AI Credits and unresolved conservative estimates across all completed runs of this workflow in the last 24 hours reaches 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.

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/github/gh-aw/actions/runs/46767536670
Copy a debugging prompt

After any required manual threat review, paste this into your coding agent:

Debug the agentic workflow "auto-triage-issues" failure.
Follow https://raw.githubusercontent.com/github/gh-aw/main/debug.md
Failed run: https://github.com/github/gh-aw/actions/runs/46767536670

If the repository includes the agentic-workflows skill, load it before investigating.

Manage failure notifications

To stop creating failure issues for this workflow, set this in its frontmatter and recompile:

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

This only disables issue reporting; it does not fix the failure.

Generated from Auto-Triage Issues · history

  • expires on Dec 2, 2026, 11:17 AM UTC
主要语言
Go
星标
5.7k
派生
646
平均合并
4 小时 29 分钟
30 天内合并 PR
829

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-aw 的其他 Issue

查看 github/gh-aw 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。