Skip to content

Use gh codespace code --web to restart a codespace in the browser - #47013

Merged
subatoi merged 2 commits into
github:mainfrom
Manishram-ai:fix-codespace-code-web-restart
Nov 20, 2026
Merged

subatoi merged 2 commits into
github:mainfrom
Manishram-ai:fix-codespace-code-web-restart

Conversation

@Manishram-ai

Copy link
Copy Markdown
Contributor

Why:

Closes: N/A

In the CLI version of "Restarting a codespace", the browser option tells you to run gh codespace open --web. gh has no codespace open subcommand, so that command fails:

$ gh codespace open --web
unknown flag: --web

Without --web you get unknown command "open" for "gh codespace". The codespace subcommands are registered in pkg/cmd/codespace/root.go, and there's no open among them. Opening a codespace in the browser is gh codespace code --web, which "Opening an existing codespace" already uses.

What's being changed (if available, include any code snippets, screenshots, or gifs):

In content/codespaces/developing-in-a-codespace/stopping-and-starting-a-codespace.md, gh codespace open --web becomes gh codespace code --web in the bullet and in its code block. Nothing else on the page changes.

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

gh has no codespace open subcommand, so the documented command fails with 'unknown flag: --web'. gh codespace code --web opens the codespace in the web client.
Copilot AI lite review requested due to automatic review settings November 20, 2026 01:09
@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
codespaces/developing-in-a-codespace/stopping-and-starting-a-codespace.md fpt
ghec
fpt
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review found no active issues, and the documentation now uses the valid gh codespace code --web command consistently.

No open issues 🎉

What changed in this PR

Corrects the Codespaces restart documentation to use the valid gh codespace code --web command for opening a codespace in the browser.

Changes:

  • Replaced the invalid command in the explanatory bullet and corresponding shell code block.
File Description
content/​codespaces/​developing-in-a-codespace/​stopping-and-starting-a-codespace.md Updates the browser-based codespace restart instructions to use gh codespace code --web.

Review effort: Lite

@subatoi subatoi added content This issue or pull request belongs to the Docs Content team and removed triage Do not begin working on this issue until triaged by the team labels Nov 20, 2026

@subatoi subatoi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for spotting that and raising a fix, @Manishram-ai; I'll get this merged now

@subatoi
subatoi added this pull request to the merge queue Nov 20, 2026
Merged via the queue into github:main with commit f48cc84 Nov 20, 2026
50 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants