Allow setting a per-project AI credit limit (--max-ai-credits) for agent sessions
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Feature summary
A project-level AI credit ceiling for agent sessions, plus in-session controls to raise or waive the limit when it is reached.
### What problem are you trying to solve?
Copilot CLI supports AI credit session limits (--max-ai-credits in non-interactive mode, /limits set in interactive mode), but the GitHub Copilot app offers no way to configure them. Since the app runs the CLI, every session started from the app is effectively unbounded. A badly scoped prompt or an agent that gets stuck in a loop can consume a large number of credits before I notice.
Different projects carry very different risk. A small maintenance repository and a large refactoring project warrant different ceilings, so a single global value would be a poor fit. The limit belongs at project level.
### Proposed solution
- Add a per-project setting, e.g. "Maximum AI credits per session", mapping to --max-ai-credits=NUMBER.
- Show live consumption against the limit during a session (e.g. "62 / 150 AI credits"), so the cap is not a surprise.
- When the limit is reached, do not end the session silently. Present the interactive-mode recovery as buttons:
- "Double AI credit limit for this session"
- "Ignore AI credit limit for this session"
- "Stop here"
- Continuing should resume from where the agent stopped, matching /limits set behavior in an interactive session, rather than restarting the task.
- Any raise or waiver should apply only to the current session and must not silently change the project default.
### Workflow impact
Affects users on usage-based billing who start agent sessions from the app. Today the only way to get a cost guardrail is to drop down to the CLI, which negates the reason for using the app.
Combining a guardrail with an escape hatch is the key point: I can set an aggressive default cap without fearing that a long-running task gets discarded halfway through, because raising the limit is one click and the session continues.
### Installation context
_No response_
### Additional context
_No response_
贡献指南
调研方向
尚未确定任何文件或测试。首先追踪 app 如何启动 agent 会话并传递 CLI 选项,然后检查项目设置和会话内的限制控制。完成的标准是具备项目级默认值、可见的使用量、仅对当前会话生效的提高/豁免/停止操作,并且无需重启或更改项目设置即可继续。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github
- 领域
- ai, desktop
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100