Files
llm-wiki/raw/articles/github-copilot-ai-credit-session-limits-2026.md
T
2026-07-03 00:38:05 +09:00

32 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
source_url: "https://github.blog/changelog/2026-07-01-set-ai-credit-session-limits-in-copilot-cli-and-sdk/"
ingested: 2026-07-01
sha256: 185c8df3df1fa52d8ff07b82ac4de2a170ee6c0c307de4f3933fb5845c2d1ece
discovered_from:
platform: discord
channel_id: "1477793137064935675"
channel_name: tw
message_id: "1521959076395745424"
author_id: "1477793167486226708"
posted_at: "2026-07-01T19:22:00.445000000Z"
discovery_url: "https://x.com/GHchangelog/status/2072394832421486832"
message_excerpt: "GitHub announced AI credit session limits for Copilot CLI/SDK alongside other agent surrounding-device updates."
score: 4
---
[Back to changelog](https://github.blog/changelog/)
You can now set AI credit session limits in Copilot CLI and the GitHub Copilot SDK to cap the amount an agent spends in a session. This is especially useful for automation, where no one is actively monitoring the agent’s work.
Set a limit before you start work or kick off jobs, and Copilot tracks AI credit usage across the entire session, including model calls, subagents, and background work like compaction. When the limit is reached, the agent wraps up and lets you know instead of running until the task is finished or until you manually stop it.
- In an interactive session, use `/limits` to view, set, or remove your limit. When it’s reached, Copilot prompts you to raise or adjust it and then continues from where it stopped. There’s no need to restart the task.
- For noninteractive runs, pass `--max-ai-credits` to bound a single run. The run ends when the limit is reached, so it’s easy to use in scripts.
Session limits are a soft cap. Since usage is only known after a response returns, a response that’s already underway finishes before Copilot stops, so actual usage may slightly exceed the number you set. A session limit controls spend for one session—it complements, but doesn’t replace, your overall budgets and spending limits.
Session limits are available in public preview for Copilot for Individuals, Business, and Enterprise, and are subject to change. They’re supported in Copilot CLI 1.0.66 and later, and in Copilot SDK 1.0.5 and later.
To get started, update GitHub Copilot CLI by running `copilot update` in your terminal. To learn more, see [Setting a session limit in Copilot CLI](https://docs.github.com/copilot/how-tos/copilot-cli/use-copilot-cli/set-session-limit) and [Optimize AI usage](https://docs.github.com/copilot/tutorials/optimize-ai-usage).
Share feedback with the `/feedback` command in a CLI session or open an issue in [our public repository](https://github.com/github/copilot-cli).