Build what's next on GitHub, the place for anyone from anywhere to build anything.
Join us October 28-29 in San Francisco or online for GitHub Universe, our flagship developer event uniting people, agents, and the world's code.
Follow this step-by-step guide to learn how to debug your issues using GitHub Copilot Spaces and Copilot coding agent.

Every developer knows this pain: you open an issue, and before you can write a single line of code, you’re hunting. You’re digging through old pull requests, searching for that design doc from three months ago, trying to remember which file has the security guidelines.
That hunting phase? It takes forever. And it’s not even the actual work. And even if you want to bring AI into the picture, GitHub Copilot still needs the same thing you do: context. Without it, you get generic answers that don’t understand your codebase.
GitHub Copilot Spaces fixes that.
Spaces gives GitHub Copilot the project knowledge it needs—files, pull requests, issues, repos—so its responses are grounded in your actual code, not guesses.
Are you a visual learner? Watch the full demo below. 👇
Think of a space as a project knowledge bundle. You curate the files, docs, and decisions that matter for your project, and Copilot uses all of that when generating plans, explanations, or pull requests.
You can:
The best part? Link it once and forget about it. Spaces automatically stay synced with the linked content. When your codebase updates, your space updates too.
A contributor opened an issue reporting an unsafe usage of check_call in your project.
As a maintainer, you might not know the best way to fix it immediately. On your own, you’d start by searching the repo, checking past pull requests, and combing through security guidelines just to figure out where to begin.
With Spaces, you don’t have to do that manually. Create a space, add the issue and the key files or docs, and let Copilot reason across everything at once.
Inside the space, add:
/docs/security/check-patterns.md, /docs/design/architecture-overview.md)Each space includes an Instructions panel. This is where you tell Copilot how you want it to work inside your project.
Here are some example instructions that will help with our task at hand:
These instructions keep Copilot consistent. It won’t hallucinate patterns that don’t exist in your repo because you’ve told it to cite its sources.
Learn best practices for building effective custom agents for Copilot, based on an analysis of over 2,500 repositories.
With everything set up, ask Copilot: “Help me debug this issue.”
Copilot already knows which issue you mean because it’s linked to the space. It parses through all the sources, then returns a clear plan:
Goal: Fix unsafe usage of runBinaryCheck to ensure input paths are validated.
Approach:
runBinaryCheckThis isn’t a generic LLM answer. It’s grounded in the actual project context.
Once you approve the plan, tell Copilot: “Propose code changes using Copilot coding agent.”
The agent generates a pull request with:
Every file in the pull request shows which source informed the suggestion. You can audit the reasoning before you merge.
Not happy with something? Mention @copilot in the pull request comments to iterate on the existing pull request, or go back to the space to generate a fresh one. Keep working with Copilot until you get exactly what you need.
Spaces are private by default. But you can share them with specific individuals, your entire team, or your whole organization (if admins allow it).
Enterprise admins control who can share what, so you stay aligned with your company’s security policies.
Spaces are now available in your IDE via the GitHub MCP Server.
Install the MCP server, and you can call your spaces directly from your editor. Same curated context, same grounded answers, but right where you’re already working.
Being able to call a space from the IDE has been a game changer for me. It lets me stay focused without switching between the browser and my editor, which cuts out a ton of friction in debugging.
Here’s what’s on the roadmap:
1. Code generation and debugging. Use spaces with Copilot coding agent to generate pull requests aligned with your patterns, security rules, and architecture.
2. Planning features. Link issues, design docs, and repos to plan features and draft requirements. Ask Copilot for a technical plan and it generates a pull request.
3. Knowledge sharing and onboarding. Spaces become living knowledge bases. New engineers onboard faster. Existing engineers stop answering the same questions repeatedly.
Here’s my challenge to you:
You’ll see exactly how much time you save when Copilot actually knows your project. Your AI assistant should never lack the right context. That’s what spaces are for.
Want to see the full demo? Watch the GitHub Checkout episode on Copilot Spaces and try GitHub Copilot Spaces.