Note: The ability to prebuild codespaces is currently in beta and subject to change.
For more information about Codespaces prebuilds, see "Prebuilding your codespaces."
Checking whether a codespace was created from a prebuild?
If multiple machine types are available when you create a codespace then a dialog box is displayed giving you a choice of machine types. This will display the " Prebuild ready" label beside machine types for which prebuilds are available.

If you have your Codespaces editor preference set to "Visual Studio Code for Web" then the "Setting up your codespace" page will show the message "Prebuilt codespace found" if a prebuild is being used. Similarly, if your editor preference is "Visual Studio Code" then the integrated terminal will contain the message "You are on a prebuilt codespace defined by the prebuild configuration for your repository" when you create a new codespace. For more information, see "Setting your default editor for Codespaces."
After you have created a codespace you can check whether it was created from a prebuild by running the following GitHub CLI command in the terminal:
gh api /user/codespaces/$CODESPACE_NAME --jq .prebuildThis returns true if the codespace was created using a prebuild.
Alternatively, if GitHub CLI (gh) is not installed, you can use the following command, which returns createFromPrebuild if the codespace was created from a prebuild:
cat /workspaces/.codespaces/shared/environment-variables.json | jq '.ACTION_NAME'The "Prebuild Ready" label is sometimes missing
You may notice that sometimes, when you create a new codespace from a prebuild-enabled branch, the " Prebuild Ready" label is not displayed in the dialog box for choosing a machine type. This means that prebuilds are not currently available.
Each time you push to a prebuild-enabled branch, the prebuild template is updated. If the push involves a change to the dev container then, while the update is in progress, the " Prebuild Ready" label is removed from the machine types dialog box. During this time you can still create codespaces without a prebuild template.
If your branch is not specifically enabled for prebuilds it may still benefit from prebuilds if it was branched from a prebuild-enabled branch. However, if the dev container is changed on your branch, so that it's not the same as the dev container on the base branch, prebuilds will no longer be available on your branch.
Here are things to check if the " Prebuild Ready" label is not displayed for a particular branch:
- Confirm that a prebuild configuration exists for this branch. If you’re not a repository administrator, you'll need to reach out to one to confirm this.
- Confirm that the prebuild configuration includes your region.
- Check whether a change to the dev container configuration was pushed to the prebuild-enabled branch recently. If so, you will have to wait until the prebuild workflow run for this push completes before prebuilds are available again.
- If no configuration changes were recently made, go to the Actions tab of your repository, click Codespaces Prebuilds in the workflows list, and check that prebuild workflow runs for the branch are succeeding. If latest runs of a workflow failed, and one or more of these failed runs contained changes to the dev container, then there will be no available prebuilds for the associated branch.

