Skip to main content

Managing the spending limit for GitHub Codespaces

You can set a spending limit for GitHub Codespaces usage.

About the GitHub Codespaces spending limit

GitHub Codespaces is paid for either by an organization, an enterprise, or a personal account. The Free and Pro plans for personal accounts include free use of GitHub Codespaces up to a fixed amount of usage every month. For more information, see "About billing for GitHub Codespaces."

Note: You must set a non-zero spending limit on your personal, organization, or enterprise account before the account can be billed for use of GitHub Codespaces.

By default, all accounts have a GitHub Codespaces spending limit of $0 USD. This prevents new codespaces being created, or existing codespaces being opened, if doing so would incur a billable cost to your personal, organization, or enterprise account. For personal accounts, codespaces can always be created and used if the account has not reached the limit of its monthly included usage. For organizations and enterprises, the default spending limit means that, to allow people to create codespaces that are billed to the organization, or its parent enterprise, the limit must be changed to a value above $0 USD. Costs for GitHub Codespaces are always billed monthly, even if your account is otherwise billed annually.

Once you've reached your spending limit, you will no longer be able to create new codespaces, and you won't be able to start existing codespaces. Any existing codespaces that are still running will be shut down in a short time, but you will not be charged for usage after you have reached your spending limit.

Managing the GitHub Codespaces spending limit for your personal account

You can set a spending limit for GitHub Codespaces for your own personal account.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the "Access" section of the sidebar, click Billing and plans.

  3. At the top of the page, under "Payment information", click Manage spending limit. Manage spending limit link

  4. Under "Codespaces", choose to limit spending or allow unlimited spending.

    Screenshot of the radio buttons to limit spending or allow unlimited spending

  5. If you chose to limit spending, under "Limit spending", type a limit, then click Update limit. Field to type spending limit and Update limit button

Managing the GitHub Codespaces spending limit for your organization account

Organizations owners and billing managers can manage the spending limit for GitHub Codespaces for an organization.

Note: Organizations that are owned by an enterprise account cannot specify their own spending limit as this is specified in the enterprise settings.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the "Access" section of the sidebar, click Organizations.

  3. Next to the organization, click Settings. The settings button

  4. If you are an organization owner, in the "Access" section of the sidebar, click Billing and plans.

  5. At the top of the page, under "Payment information", click Manage spending limit. Manage spending limit link

  6. Under "Codespaces", choose to limit spending or allow unlimited spending.

    Screenshot of the radio buttons to limit spending or allow unlimited spending

  7. If you chose to limit spending, under "Limit spending", type a limit, then click Update limit. Field to type spending limit and Update limit button

Exporting changes when you have reached your spending limit

If your personal, organization, or enterprise account reaches its spending limit, you will no longer be able to create or resume codespaces that are billable to that account. However, you can still export any work-in-progress changes to a new branch. For more information, see "Exporting changes to a branch."

Managing usage and spending limit email notifications

Email notifications are sent to account owners and billing managers when spending reaches 75%, 90%, and 100% of an account's spending limit.

You can turn off these notifications at any time by navigating to the bottom of the "Billing & plans / Monthly spending limits" page and clearing the Spending limits alerts checkbox.

For personal accounts only, you can also choose to turn off email notifications that are sent when you have used 75%, 90%, and 100% of the free usage included with your personal account. To do this, clear the Included resources alerts checkbox.

Screenshot of the billing email notification settings

Further reading