GitHub Copilot in GitHub Codespaces: Keep Your Work in Context

GitHub Copilot is built into GitHub Codespaces and ready to use as soon as the environment starts. Here is how to make the most of it, review its suggestions, and save task state before a session ends.

Updated 5 min read

GitHub Copilot is included in GitHub Codespaces environments when you have a Copilot plan, and it activates automatically in the browser-based VS Code interface. You do not need to install extensions yourself. What Copilot cannot do is remember what you were working on when the Codespace stops or when you switch to a different one. Tools like fenbs hold task context outside any environment, so the next session picks up from where the last one stopped regardless of which Codespace opens.

This guide covers how Copilot works inside Codespaces, how to review the changes it makes, and how to save your work state before an environment or assistant changes.

How Copilot works inside Codespaces

When you open a Codespace, VS Code loads in the browser with the GitHub Copilot extension already configured if your account has Copilot access. Completions and chat are both available. The Copilot cloud agent can also run tasks inside a Codespace when you have the right plan and repository configuration.

Codespaces runs your full development environment in the cloud, so Copilot sees the same file structure and installed tools as your local setup would. This makes suggestions more accurate than in a bare context because the code is actually there for Copilot to read. Check GitHub's Codespaces documentation (opens in a new tab) and Copilot documentation (opens in a new tab) for the current feature list and plan requirements.

Setting up and verifying Copilot in a Codespace

  1. Open a repository on GitHub and click the Code button, then Codespaces, then Create codespace.
  2. Once the Codespace loads, check the Copilot icon in the VS Code status bar at the bottom to confirm it is active and signed in.
  3. Open a file and start typing to test inline completions.
  4. Open the Copilot chat panel to ask questions about the codebase or request code.
  5. If Copilot is not active, check that your GitHub account has a Copilot plan and that the extension is not disabled in the Codespace settings.

Reviewing Copilot changes before you accept them

Inline completions in Codespaces work the same as in a local VS Code setup: you see a gray suggestion and press Tab to accept it. For longer changes made through Copilot chat or the agent, review the diff before accepting. The diff view in VS Code shows exactly what will change, file by file.

When Copilot makes changes across multiple files, open each modified file and read the diff carefully. Pay attention to changes outside the area you asked about: Copilot sometimes modifies configuration files or imports as side effects of a larger change.

For reviews in shared repositories, commit reviewed changes to a branch and open a pull request rather than pushing directly to the main branch. This follows the same discipline described in GitHub Copilot advanced settings.

What stops when the Codespace stops

A Codespace pauses or shuts down after a period of inactivity and can be deleted. The code changes you committed are safe on the branch, but any context that lived only in the session is gone: what the chat assistant knew, which task you were in the middle of, and what you planned to check next.

If you switch from one Codespace to another, or move from Codespaces to a local editor, you face the same gap. The environment starts fresh with no memory of the previous session's state.

Saving task state before the environment changes

The simplest habit is to write a brief note at the end of each session: what was completed, what is in progress, what the next step is, and anything unexpected you found. A note committed to the repository works for single-person projects but is less practical for teams where multiple people pick up the same work.

An outside task record that any connected assistant can read is more reliable. When a new Codespace opens, you can ask a connected assistant to read the project context and explain where to start. That assistant does not need to be Copilot; any supported tool that connects over MCP can read the same record.

How fenbs helps

Keep task state through environment and assistant changes

In fenbs, record where each task stands and update Where we left off before a session ends. When the next Codespace opens, your connected AI assistant reads the project context and picks up from the last known state. The handoff works whether you switch environments, swap assistants, or hand the work to a colleague.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

How to do this with fenbs

  1. Create a free account and add a project for the codebase you are working on in Codespaces.
  2. Add the current tasks and their plans, including which branch and file each task touches.
  3. Connect your AI assistant over MCP from Integrations. Ask it to read the project context at the start of each Codespace session.
  4. Before closing a session, ask the assistant to save progress: what was completed, what changed, and what the next step is.
  5. When a new Codespace opens, ask the assistant to read Where we left off before writing any code.

fenbs does not need to run inside the Codespace. It is a separate service your assistant connects to over MCP at the start of each session. The Codespace provides the environment; fenbs provides the persistent record of the work that environment is doing. For team members who each use their own Codespace, the shared project record means everyone works from the same task state rather than each maintaining a private account of where things stand. See GitHub Copilot memory for how Copilot's own memory features compare.

Questions people ask.

Is GitHub Copilot automatically active in a Codespace?

Copilot is configured automatically in Codespaces when your GitHub account has Copilot access. The extension does not need to be installed manually. Check the Copilot status icon in the VS Code status bar to confirm it is active.

What happens to Copilot context when a Codespace stops?

Copilot does not retain session context when a Codespace stops. The chat history and any context from the previous session are gone. Save task state in an external record before closing a session so the next one can start from where you left off.

Can I use Copilot in Codespaces with a team?

Yes. Multiple team members can open their own Codespaces for the same repository and use Copilot independently. For the team to share task context across sessions, use a shared outside record that each connected assistant can read at the start of a session.

How do I review changes the Copilot agent made in a Codespace?

Open the diff view in VS Code to see exactly what changed, file by file. Review each modified file carefully, including changes outside the area you asked about. Commit reviewed changes to a branch and open a pull request before merging to the main branch.

More in Connect your AI tools

All Connect your AI tools articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.