Skip to content

Cursor and GitHub Copilot Official Practices ​

Bottom line: Both products use files you can commit to the repository as the main way to carry team conventions, but they cover different surfaces and have different network defaults. Treat each default as a starting point to verify in your own setup, not as a guarantee.

Audience: engineers and tech leads comparing or adopting Cursor and GitHub Copilot in a team. Prerequisites: basic use of either product. See Cursor and the Cursor Cheatsheet. Non-goal: this is not a feature reference. It covers only claims backed by quoted official text.

Sources were fetched on 2026-10-21; the page list is at the end. Where the fetched text did not support a value, this page says so instead of guessing. The Copilot pages cover different surfaces (VS Code, cloud agent, CLI), so each row names its scope.

Cursor ​

TopicWhat the docs say
Context rulesProject rules must use the .mdc extension. "Keep rules under 500 lines" is listed as a best practice, so it is a recommendation, not a validated limit. The fetched text does not establish the rules directory.
SubagentsEach subagent runs in its own context window, handles one type of work and returns the result to the parent. It starts with a clean context.
HooksHooks use custom scripts to observe, control and extend the agent loop. They are spawned processes that talk JSON over stdio. The fetched text does not list all events.
Network sandboxIn the sandbox network policy, deny always wins over allow. In the documented "allow only listed domains" example, traffic is denied by default. That default belongs to the example, not to every project.
Code reviewBugbot reviews pull requests for bugs, security issues and code quality, and comments with explanations and fix suggestions.

GitHub Copilot ​

TopicScopeWhat the docs say
Context rulesRepository instructions (VS Code page)Repository-wide instructions apply to all requests made in the context of that repository. With AGENTS.md, the nearest file in the directory tree takes precedence.
Custom agentsCloud agentAn agent profile is a Markdown file with YAML frontmatter declaring name, description, tools and MCP servers. The prompt of one profile is limited to 30,000 characters; this is a per-profile limit, not a budget for repository context files.
HooksCLI and cloud agentHooks run custom shell commands at key points of an agent workflow, such as session start or end, prompt submission and tool calls. The page states its examples target the CLI and the cloud agent.
NetworkCloud agentInternet access is restricted by a firewall by default, and the firewall applies only to processes the agent starts through its Bash tool. The fetched pages do not describe local sandboxing.
Code reviewCode reviewFeedback includes suggested changes that can be applied in a few clicks where possible. Review comments behave like human review comments.

Side by side ​

CapabilityCursorGitHub Copilot
Context rules.mdc project rules; under 500 lines recommendedRepository instructions; nearest AGENTS.md wins
Subagents / custom agentsIsolated context window, clean startMarkdown profile with YAML frontmatter; 30,000-character prompt cap
HooksScripts over stdio JSONShell commands at lifecycle points (CLI, cloud agent)
Network postureDeny beats allow; example config denies by defaultFirewall limits internet access by default (Bash-launched processes only)
ReviewBugbot comments with fix suggestionsApplicable suggestions; comments like human comments

Two practices to adopt ​

  1. Split team conventions into small topic files. Cursor recommends keeping a rule under 500 lines, and Copilot gives the nearest AGENTS.md precedence in a directory tree. Put shared conventions at the root and package-specific ones next to the code. Basis: the Cursor line recommendation and the Copilot nearest-file rule above.
  2. Start network access from deny, then allow per dependency. Cursor's sandbox policy has deny over allow, and Copilot's cloud agent restricts internet access by default. Keep those defaults and open only the domains your build needs. Basis: the network rows above; the Cursor default applies to the documented example configuration only.

Common pitfalls ​

  • Reading the 500-line figure as an enforced limit. It is a recommendation.
  • Reading the 30,000-character figure as a limit on repository instructions. It applies to one agent profile.
  • Assuming the Copilot firewall covers every process. It covers processes the agent starts through Bash.
  • Assuming a Copilot setting applies on every surface. Check the scope column.

Next steps ​

Not established ​

  • Cursor: the permission and allowlist page, and the rules directory.
  • Copilot: local sandboxing, and a hook failure-blocking switch.

Sources ​

Fetched 2026-10-21:

Built for frontend engineers · Powered by VitePress