Skip to main content

Opening an existing codespace

You can reopen a codespace that you have closed or stopped and return to your work.

GitHub Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. GitHub Codespaces is also available as a limited beta release for individual users on GitHub Free and GitHub Pro plans. For more information, see "GitHub's products."

You can reopen any of your active or stopped codespaces on, in Visual Studio Code, or by using GitHub CLI. You can't reopen a codespace that has been deleted. For more information, see "Codespaces lifecycle."

Opening an existing codespace

  1. Navigate to the "Your codespaces" page at

  2. To open a codespace in your default editor, click the name of the codespace. You can set your default editor for Codespaces in your personal settings page. For more information, see "Setting your default editor for GitHub Codespaces."

    To open the codespace in an editor other than your default, select the ellipsis (...) to the right of the codespace and click Open in APPLICATION.

    Screenshot of the "Your codespaces" page, with "Open in Visual Studio Code" highlighted

Note: To use GitHub Codespaces in VS Code, you need to install the Codespaces extension. For more information, see "Using GitHub Codespaces in Visual Studio Code."

  1. In the VS Code desktop application, open the Command Palette with Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux).

  2. Type "Codespaces" and select one of the following commands.

    • To open a codespace in a new window of VS Code, select Codespaces: Open Codespace in New Window
    • To open a codespace in the web editor, select Codespaces: Open in Browser
  3. Click the codespace that you want to open.

    Screenshot of a list of codespaces in Visual Studio Code

You can also access the commands listed above by navigating to the Remote Explorer view in VS Code and right-clicking the codespace that you want to open.

Screenshot of a codespace selected in the Remote Explorer, with "Open in Browser" highlighted

Note: If the Remote Explorer is not displayed in the Activity Bar:

  1. Access the Command Palette. For example, by pressing Shift+Command+P (Mac) / Ctrl+Shift+P (Windows/Linux).
  2. Type: codespaces.
  3. Click Codespaces: Details.
  1. In a terminal, enter one of the following GitHub CLI commands.

    • To open a codespace in VS Code, enter:

      gh codespace code
    • To open a codespace in the browser, enter:

      gh codespace code --web
  2. Using the arrow keys, navigate to the codespace that you want to open.

  3. To open the codespace, press Enter.

For more information, see gh codespace code in the GitHub CLI manual.