In short.
This GitHub guide explains session spending controls for Copilot CLI users, but its soft limits cannot guarantee a strict spending ceiling. It documents interactive /limits commands and the --max-ai-credits option for programmatic tasks, with a minimum allowance of 30 credits. At the stated credit value, that minimum represents $0.30 of usage. The feature is in public preview; runtime behavior and actual charges have not been assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-cli/use-copilot-cli/set-session-limit], including its public-preview notice, 30-credit minimum, commands and soft-limit behavior. The linked usage-optimization and billing pages are excluded. Installation, version compatibility, service terms, actual stopping behavior, overshoot and billed charges were not assessed. No commands were executed.
The overview
Identity
This is GitHub documentation for configuring an AI credit session limit in GitHub Copilot CLI. It teaches one cost-control feature rather than providing a separate application, plugin or model. The original page is [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-cli/use-copilot-cli/set-session-limit].
Assessment
The guide is useful for existing Copilot CLI users who want a session to stop after consuming a chosen credit allowance. It supplies enough syntax to configure the feature in interactive and programmatic use. It does not establish measured savings, a guaranteed maximum charge or compatibility with a particular CLI release.
Users
Interactive users can apply one allowance across a conversation containing multiple messages. Developers invoking Copilot CLI from scripts can apply an allowance to a single task. Beginners receive the relevant commands, while installation, authentication and general CLI usage are outside this guide.
Capabilities
The documented controls let users set an interactive session limit, remove it and raise it to continue after stopping. A command-line option sets a limit for programmatic tasks. Interactive sessions prompt users to reset the allowance when it is reached; non-interactive runs end at that point, after any in-progress response finishes.
Using it
Requirements
The instructions assume Copilot CLI is already available. Any configured session limit must be at least 30 AI credits. The page does not specify a minimum CLI version, supported operating systems, required subscription, authentication procedure or administrative prerequisites.
Mechanism
AI credits account for model-interaction costs, which depend on the model and tokens consumed. In interactive mode, credit consumption accumulates across the entire session rather than resetting with each message. In programmatic mode, the limit applies to Copilot's work on the task.
The limit is soft: a response already underway completes before Copilot stops. The page says usage may therefore slightly exceed the configured allowance, without specifying a numerical maximum for that excess.
Setup
Within an interactive session, enter /limits set max-ai-credits NUMBER, replacing NUMBER with an allowance of at least 30. Enter /limits unset to remove the limit. After the session stops, /limits set can raise the allowance so work can continue from the stopping point.
For programmatic use, the page shows copilot -p "YOUR PROMPT" --max-ai-credits NUMBER. It also describes the option using the --max-ai-credits=NUMBER spelling.
Example
An illustrative interactive command is /limits set max-ai-credits 100. Following the documented behavior, that allowance would be shared across subsequent messages in the session.
An illustrative programmatic command is copilot -p "Summarize the README" --max-ai-credits 100. The prompt and allowance are examples. Neither command was executed, and no completion result, usage total or charge was observed.
Assessment & evidence
Limitations
The feature is in public preview and subject to change. It cannot enforce an exact spending ceiling because an in-progress response finishes after the allowance is reached.
The documented stopping rule means a task may end before its goal is complete. The page does not specify process exit codes, handling of partially completed work, maximum overshoot or a method for resuming a non-interactive run.
Practical implications
A shared interactive allowance can help users manage consumption across a longer conversation. For automation, the stopping rule introduces a tradeoff: a chosen allowance can bound how far a task proceeds, while the task may remain unfinished and its final response may consume extra credits. These are implications of the documented rules; the page provides no savings or task-completion measurements.
Alternatives
The page describes task completion or user intervention as stopping conditions without a session limit, and /limits unset removes an interactive limit. It does not compare other CLI assistants, account-wide spending controls or mechanisms that enforce a strict maximum charge. Their suitability is not assessed.
Evidence
The evidence consists of the complete GitHub documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-cli/use-copilot-cli/set-session-limit]. It supports the command syntax, minimum allowance, credit value and described stopping behavior. It contains no runtime logs, measured overshoot or observed billing results.
Access & freshness
Costs
The page values each AI credit at $0.01 USD. At that conversion, the minimum 30-credit allowance represents $0.30 of usage, and 100 credits represents $1.00. Soft-limit overshoot can increase usage beyond the configured amount.
The page does not establish subscription prices, included credit allowances or the final amount a user would be billed. Those costs remain unknown from this source.
Rights
The page does not provide a documentation redistribution licence or Copilot service terms. Permission to redistribute the guide and the terms governing commercial use of Copilot are not established by this source.
Freshness
The page was captured on 15 November 2026 at 13:02:29.797 UTC. In that capture, session limits are labelled public preview and subject to change. No publication date, last-updated date or corresponding CLI version is supplied, so compatibility with any particular installed release remains unknown.
Next steps
Choose an allowance of at least 30 credits and use the command matching interactive or programmatic operation. Account for possible overshoot when choosing the amount.
Before depending on this feature in automation, verify command availability, exit behavior and handling of unfinished work in your installed CLI version. Users needing a guaranteed maximum charge should establish whether another control provides that guarantee; this page does not document one.
