GitHub Codespaces Billing Guide #181042
Replies: 1 comment
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What This Guide Covers (and What It Doesn't)
✅ This Guide Covers:
❌ This Guide Does NOT Cover:
What makes Codespaces billing unique:
How Codespaces Billing Works
The Two Components of Codespaces Charges
💡 Many users are surprised by storage charges because they assume stopping a Codespace stops all charges. It doesn't—only deletion stops storage billing.
Compute Billing Explained
Core-hours measure compute usage:
Current compute rates by machine type:
Storage Billing Explained
GB-months measure storage usage:
Current storage rate: ~$0.07 per GB per month
What counts toward storage:
Free Tier Allowances
Individual vs. Organization Billing
Individual Accounts
How it works:
Budget requirement: Even if you have GitHub Pro, you must:
Organization Accounts
How it works:
Common Billing FAQs
1: "I stopped my Codespace but I'm still being charged"
Why this happens: Stopped Codespaces continue consuming storage. You're charged ~$0.07/GB/month for stored data.
Example:
Solution:
2: "I'm being charged but I haven't opened Codespaces in weeks"
Likely causes:
Solution:
3: "I exceeded my free tier—how much will I owe?"
Calculation example:
4: "I'm a student and can't access Codespaces"
The problem: Student accounts with GitHub Student Developer Pack often get stuck at $0 budget with no way to modify it.
Why it happens: GitHub requires a payment method to enable budget controls, even for free tier access.
Solution:
5: "My Codespace is blocked but I have an active subscription"
The problem: Error message: "You seem to have a billing issue. Please adjust your billing settings to continue using codespaces"
Common causes:
Step-by-step resolution:
6: "Charges appeared outside my expected billing cycle"
Understanding billing cycles:
Why this causes confusion: Your free tier resets on the 1st, but overage charges appear on your subscription anniversary date. This can make charges seem "late" or "early."
Setting Up Budgets
For Personal Accounts:
Configuring Cost-Saving Settings
1. Idle Timeout (stops compute charges)
2. Retention Period (stops storage charges)
3. Default Machine Type
Billing Troubleshooting Quick Reference
Error: "You seem to have a billing issue"
If all checks pass: Wait 48 hours, then contact GitHub Support with screenshots.
Prebuilds and Their Billing Impact
What Are Prebuilds?
Prebuilds are pre-configured Codespace images that reduce startup time. They're built automatically when you push to configured branches.
How Prebuilds Affect Billing
Prebuild Cost Example
Scenario: Repository with prebuilds on
mainbranch, 10 pushes/weekWhen to Use Prebuilds
✅ Use prebuilds when:
❌ Skip prebuilds when:
Disabling Prebuilds to Save Costs
Keep in mind that prebuilds are stored per region (at $1.05 each), so enabling all 5 regions which is the default setting—costs $5.25, and this multiplies further based on the number of versions retained in your 'Template history' settings, meaning the maximum of 5 versions across all 5 regions equates to storing 25 codespaces at $26. 25.
Edge Cases and Advanced Scenarios
Edge Case 1: Multiple Organizations
Situation: You belong to Org A and Org B, plus have personal repos.
How billing works:
Potential confusion: If orgs don't enable Codespaces billing, you may hit your personal limits faster than expected.
Edge Case 2: Forked Repositories
Situation: You fork a repo and create a Codespace in your fork.
Billing: Charged to your account (the fork owner), not the original repo owner.
Edge Case 3: Codespace in Organization Repo (Org Billing Disabled)
Situation: Org has Codespaces disabled for billing, but you can still see the Codespaces button.
What happens: Creating a Codespace may fail, or it may charge your personal account (depending on org settings).
Best practice: Check with org admin before creating Codespaces in org repos.
Edge Case 4: Billing Block with Work Trapped Inside
Emergency steps:
Check for pushed branches:
codespaces/*or recent branchesUse GitHub CLI:
gh repo clone owner/repository git branch -a # Look for your workContact support urgently:
Edge Case 5: Charges After Deletion
If charges continue 48+ hours after deleting all Codespaces:
Quick Answers
"How do I stop ALL Codespaces charges immediately?"
"What's the cheapest way to use Codespaces?"
"Can I use Codespaces completely free?"
Yes, if you:
"Why do I need a budget if I have a free tier?"
After GitHub's billing platform migration, budgets are required to:
"How long until charges appear in my billing?"
References to Existing Resources
For General Billing Questions
For Non-Billing Codespaces Questions
Official GitHub Documentation
Getting Help
Summary: The 5 Things Everyone Should Know
Stopping ≠ Deleting — Stopped Codespaces still cost money (storage). Delete what you don't need.
Budgets are required — Even with a valid subscription and free tier, you need a budget configured.
Machine size matters — A 4-core machine uses your free tier twice as fast as a 2-core.
Two billing cycles — Free tier resets on the 1st; subscription charges on your anniversary date.
Prebuilds add up — They run automatically and charge compute + storage. Disable on inactive repos.
This guide is community-maintained and designed to complement official GitHub documentation. For the most current pricing and policies, always refer to GitHub's official resources.
BetaWas this translation helpful?Give feedback.
All reactions