Skip to content

GitHub Copilot Spaces: shared context for Copilot

  • What a space contains, and how to create one with good instructions.
  • How sharing roles work.
  • How to use a space on github.com and in your IDE through the GitHub MCP Server.
  • Plan availability, limits, use cases, and how Spaces differ from Codespaces.

The examples use an invented team that builds OrdersPortal, an order-management web app.

Copilot Spaces let you organize the context that GitHub Copilot uses to answer your questions. A space is a curated, named collection of sources (repositories, code files, pull requests, issues, free-text notes, images and uploaded files) plus optional instructions that tell Copilot what to focus on. When you ask a question in a space, Copilot grounds its answer in that context. You can keep a space private or share it with your team, your organization, or anyone with the link.

Spaces are not a development environment. They don’t run code, host an editor or provide a terminal. If you are looking for a cloud-hosted development environment, that is GitHub Codespaces, compared below.

Status (checked 18 November 2026): GitHub Docs document Copilot Spaces as a standard Copilot feature, with no preview label. The docs state that “anyone with a Copilot license, including Copilot Free, can create and use Copilot Spaces” (source: docs.github.com, About GitHub Copilot Spaces, read from the github/docs repository because docs.github.com was blocked from this environment).

A new OrdersPortal developer who asks “how do we handle payment retries?” gets a generic answer unless Copilot knows where the retry policy lives and which decision record explains it. Without a space, everyone re-attaches those files in every conversation. A space stores that context once, GitHub-based sources stay in sync as they change, and teammates can reuse it.

A space has a name, an optional description, and two kinds of context.

Instructions are free text that describe what Copilot should focus on in this space: its areas of expertise, the kinds of tasks it should help with, and what it should avoid. The description field does not affect answers; only instructions do.

Sources come in four kinds, all added through Add sources:

Source type What you add Notes
Files and repositories Files, folders or whole GitHub repositories Repositories are searched for relevant content; files are loaded in full
Links URLs of GitHub files, pull requests and issues Kept in sync as they change
Uploads Files from your machine: images, text files, rich documents, spreadsheets Not available when you use the space from an IDE
Text content Pasted notes, meeting transcripts, checklists Useful for knowledge that isn’t in a repository

Repository or files? An attached repository is searched, and only content relevant to each question is retrieved, which suits broad questions. An attached file is loaded in full into the context window for every question, which suits a few documents Copilot must always respect, such as a coding standard. Spaces use the latest code on the repository’s main branch.

  1. Go to github.com/copilot/spaces and click Create space.
  2. Name the space, for example OrdersPortal onboarding.
  3. Choose the owner: your personal account or an organization you belong to. You choose this at creation time, and it decides the sharing options.
  4. Click Create space, then optionally add a description so others understand its purpose.
  5. Add instructions and sources.

You can also add a file while you browse code. In the code view on GitHub, click the Add to space icon at the top of any file and pick a space, or create a new one.

Good instructions are short and specific. For an OrdersPortal onboarding space they might read:

You help new engineers understand the OrdersPortal codebase.
Explain where things live before explaining how they work, and link to the
files in this space. Follow the conventions in docs/CONTRIBUTING.md.
Order totals use decimal, never floating point. If a question is about
production credentials or customer data, say that it is out of scope and
point to the security runbook instead.

This is plain text that you paste into the space’s instructions field; it is not code.

Sharing options depend on who owns the space.

Organization-owned spaces use GitHub’s permission model. Click the share icon in the top-right corner of the space, add users or teams, and give each one a role. You can also set a base role for all other organization members:

Role Can do
Viewer Ask questions; view attachments and instructions
Editor Everything a viewer can, plus change attachments, name, description and instructions; cannot change sharing or delete
Admin Everything an editor can, plus change sharing settings and delete the space
No access The space is hidden from other organization members

Shared organization spaces appear on the Organizations tab at github.com/copilot/spaces.

Personal spaces can stay private, be shared with specific GitHub users, or be made public with Anyone with link under “General access”. Public spaces are view-only by default.

In every case, viewers can only see sources they already have access to. Sharing a space does not grant access to a private OrdersPortal repository. Someone without repository access sees the space, but not that source.

Eligibility is user-based: GitHub Docs note that a user whose Copilot seat comes from another organization can currently create a space under an organization that has Spaces disabled.

On github.com, open the space and ask questions in its chat. Copilot uses the instructions and the most relevant sources. If a space mixes data from several organizations, or mixes private and organization data, chat may not work correctly in Copilot in the cloud. To fix it, include only public repositories and private repositories owned by the space owner.

In your IDE (verified): GitHub Docs confirm that you can use spaces from any IDE that supports the Copilot extension and the GitHub MCP Server. This works through the remote GitHub MCP Server, only in agent mode, and only after you enable the copilot_spaces toolset, which is not in the default set. The configuration below is a fragment for .vscode/mcp.json, from GitHub Docs:

{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"X-MCP-Toolsets": "default,copilot_spaces"
}
}
}
}

The dedicated URL https://api.githubcopilot.com/mcp/x/copilot_spaces gives only the Spaces tools. The copilot_spaces toolset exists only on the remote server. In agent mode, open the tools list and confirm that list_copilot_spaces and get_copilot_space are enabled. Then reference the space in a prompt:

Using the Copilot space 'OrdersPortal onboarding' owned by orders-team,
explain how an order moves from cart to fulfillment.

Follow-up prompts in the same conversation keep access to the space. In the IDE, repository sources and uploaded files are not available. You get text content, GitHub files, issues, pull requests and the instructions. If you use a fine-grained PAT for an organization-owned space, the MCP server README says the token must be installed on that organization with organization_copilot_spaces: read, and it must reach every referenced repository. Otherwise the space may appear not to exist.

  • Who can use it: anyone with a Copilot license, including Copilot Free.
  • Usage: questions asked in a space count as Copilot Chat requests and consume AI credits based on the model and the tokens processed. On Copilot Free they count toward the monthly chat limit. On Copilot Business and Copilot Enterprise they draw from the enterprise’s shared AI credits pool.
  • Context limits: GitHub’s responsible-use notes say spaces “have defined size limits” and Copilot Chat processes only part of the content. Not every file or note is used in every answer. GitHub Docs do not publish the exact numbers, so be selective rather than attaching everything.
  • Accuracy: grounding reduces wrong answers but does not remove them. Review what Copilot produces.
  • Onboarding: entry points, architecture notes, setup checklist and diagrams, with senior engineers as editors.
  • Team conventions: a style guide, review checklist and example pull requests.
  • System knowledge: one space per complex area, such as payments or the CI pipeline.
  • Feature work: the epic issue, design notes, related pull requests and the files that will change, collected for one task.

Avoid spaces as a store for secrets or sensitive documents. Anything you upload is shown to everyone who can view the space.

Copilot Spaces GitHub Codespaces
What it is Curated context for Copilot Chat Cloud-hosted development environment (a container with an editor and terminal)
Runs code No Yes
Main contents Sources, instructions, notes A repository checkout, dev container configuration and tools
Billing AI credits for chat requests Compute and storage usage
Typical use Ask grounded questions; share team knowledge Develop and test without local setup

They combine well: in a codespace running VS Code, agent mode can use the team’s space through the GitHub MCP Server.

  • Expecting the description to steer answers. Only instructions and sources do.
  • Attaching whole repositories when a few files matter. Attached files are always considered, while repository content is only searched.
  • Assuming sharing grants repository access. Viewers see only the sources they can already access.
  • Using the default MCP configuration in the IDE. Add copilot_spaces to the toolsets, or the tools won’t appear.

GitHub Docs pages were read from the github/docs repository (commit of 18 November 2026) because docs.github.com was blocked from this environment.