Allow setting a per-project AI credit limit (--max-ai-credits) for agent sessions
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 2.1k
- Fork
- 153
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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_
Hướng dẫn đóng góp
Hướng nghiên cứu
Chưa xác định được tệp hoặc bài kiểm thử nào. Hãy bắt đầu bằng cách lần theo cách app khởi chạy các phiên agent và truyền các tùy chọn CLI, sau đó kiểm tra phần cài đặt dự án và các điều khiển giới hạn trong phiên. Được xem là hoàn tất khi có giá trị mặc định ở cấp dự án, mức sử dụng hiển thị rõ ràng, các hành động tăng/miễn/b dừng chỉ áp dụng cho phiên đó và có thể tiếp tục mà không cần khởi động lại hoặc thay đổi cài đặt dự án.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github
- Lĩnh vực
- ai, desktop
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100