Before Paying for Codespaces, Check What a Closed Tab Still Leaves Running

Short answer: Closing the browser tab doesn’t stop a codespace. GitHub says that if you close the tab, "the codespace remains running on the remote machine" until you stop it or it times out from inactivity, and compute is used while it runs. Stopping ends compute but not storage: "A stopped codespace incurs only storage costs." On a personal account, that storage first draws down the free usage included every month, so a stopped codespace doesn’t automatically mean a paid bill. Check the meter and the paying account before you add payment.

Scope: based on three GitHub Docs pages checked October 17, 2026, 05:20 KST (October 16, 20:20 UTC); links at the end. GitHub says free Codespaces use "is included in personal accounts only. It is not included in organization or enterprise accounts." We haven’t signed in, opened or deleted a codespace, or viewed a billing page for this guide. It gives no prices, cost estimate or savings figure, and it isn’t a deletion tutorial.

Closed, running, stopped, deleted: what each state still uses

This is our own summary of the states GitHub describes, not a copy of any GitHub screen.

StateComputeStorageWhat to verify next
Tab closed, not stoppedStill running until you stop it or the idle timeout stops itStill countedWhether the codespace is still running
RunningUsedUsedYour idle timeout setting and whether you still need it running
StoppedNot usedStill used while the codespace existsWhether your saved work is also pushed somewhere else
DeletedNot usedStops adding from that point, but this month’s figure doesn’t go downThat your work was pushed or exported before deletion

Before the deleted row looks like a fix: GitHub says "Deleting a codespace will not reduce your used storage amount for the billing current month as this is a cumulative figure." It also says that "if your codespace is deleted, then your work will be deleted too." To keep work, you commit and push it, or export it to a branch, first. Deleting doesn’t reduce what has already been counted, and it doesn’t save unpushed work for you.

Storage you can’t see in the list, and who pays for it

Prebuilds. GitHub says that "although prebuilds are not listed on the ‘Your codespaces’ page, prebuilds created for a repository consume storage even if you do not currently have any codespaces for that repository." An empty codespace list doesn’t prove zero storage use. GitHub also says prebuilt codespaces "are generated using actions minutes", so a separate GitHub Actions meter can be involved; see our GitHub Actions budget checklist.

Default vs. custom image. If a codespace uses GitHub’s default Linux image, "Storage of base dev containers built from the default dev container image is free of charge and does not consume your included storage." With a custom base image, the container and all the files in the codespace count as used storage. Two codespaces can therefore count storage differently depending on their base image.

The paying account. GitHub says "All usage is billed either to the account of the person who created the codespace or to the owning-organization." Organization settings decide when an organization pays, and forks have their own rules: codespaces from a fork are billed to your personal account unless the parent repository’s organization has allowed you to use codespaces at its expense. Even then, storage for prebuilds you create for a fork comes out of your own included storage. Don’t infer the payer from a tab title or repository name; check the billing settings of the account that owns the codespace.

A blank worksheet before you add payment

Fill this in from what you can see in your own account. Every line starts as UNKNOWN; leave it that way if you can’t confirm it. Don’t paste account names, payment details, secrets or screenshots into anything you share.

  1. Billable owner (your personal account or an organization): UNKNOWN
  2. Current monthly billing cycle dates: UNKNOWN
  3. Each codespace’s state (running or stopped): UNKNOWN
  4. Included compute remaining this cycle: UNKNOWN
  5. Cumulative storage used this cycle: UNKNOWN
  6. Storage used by prebuilds: UNKNOWN
  7. Default or custom base image, per codespace: UNKNOWN
  8. Payment method and budget status: UNKNOWN
  9. Work saved outside the codespace (pushed or exported): UNKNOWN

GitHub says you can check cumulative Codespaces usage for the current monthly billing cycle in your GitHub settings, and expand the storage section "to see how much of the consumed storage was used by prebuilds."

What to check before paying

GitHub says: "If your account does not have a valid payment method on file, usage is blocked once you use up your quota." Adding payment is one documented route, not the only one. If you are blocked from resuming a codespace, GitHub lists three options:

  1. Add a payment method and review your budget settings.
  2. Export the changes from the codespace to a branch.
  3. Wait for your monthly included usage to reset at the start of the next billing cycle.

If a payment method is already on file, GitHub notes that "spending may be limited by one or more budgets," so check the budgets that already exist on the paying account. This guide doesn’t ask you to change them, delete anything or add a card.

FAQ

Why does storage keep counting after I stop a codespace? GitHub says a codespace accrues storage "until it is deleted, irrespective of whether it is active or stopped."

Why didn’t my storage figure drop after I deleted a codespace? GitHub says deleting a codespace or a prebuild "will not reduce the usage figure for the current month, but it will reduce the rate at which storage usage accumulates." Usage resets when a new billing cycle starts.

My codespace list is empty. Why is storage still being used? Prebuilds aren’t in that list but can still consume storage (see above).

Do I have to add a payment method to keep working? Not necessarily. Besides adding payment, GitHub documents exporting your changes to a branch or waiting for the monthly reset. Which route fits depends on your own account, which this guide hasn’t seen.

Sources (GitHub Docs, checked October 17, 2026):