GitHub Copilot CLI

GitHub Copilot CLI is a terminal-native coding-agent harness. This entry covers its instruction discovery, session controls, and permissions, not the behavior of whichever model it runs.

Summary

GitHub Copilot CLI is a terminal-native coding-agent harness. This entry covers its instruction discovery, session controls, and permissions, not the behavior of whichever model it runs.

Instruction files

AGENTS.mdCLAUDE.mdGEMINI.md

Repository-level instruction files this harness reads. Treat their effective permissions as part of the setup.

Recommended

  • Put repository-wide conventions in .github/copilot-instructions.md; use .github/instructions/**/*.instructions.md with applyTo when guidance should follow particular paths or file types.
  • Use AGENTS.md, CLAUDE.md, or GEMINI.md where their standard-location discovery is useful, and inspect the effective set with /instructions.
  • Keep user, repository, and path-specific instructions consistent because Copilot CLI combines applicable files without defining a general precedence order.
  • In automation, allow only the tools and URLs the task needs and set an explicit model when reproducibility across environments matters.
  • Treat copilot init or /init as a repository authoring action: review the generated or updated .github/copilot-instructions.md before committing it.

Avoid

  • Describing this entry as coverage for Copilot in IDEs, GitHub.com, cloud agent, or code review; those surfaces have different support matrices.
  • Assuming a path-specific instruction applies when its applyTo pattern does not match the files in the current task.
  • Using --allow-all or --yolo as a routine shortcut outside an isolated environment.
  • Attributing instruction merging, permission prompts, or tool availability to the model.

Context & tool use

Copilot CLI combines applicable personal, repository, agent, and path-specific instructions at session start. Supported instruction files can import repository-local files with @path; /instructions shows the discovered set. Tool availability and approval are separate controls: --available-tools or --excluded-tools restrict what the model can see, while --allow-tool and --deny-tool control approval.

Known limitations

Instruction changes are not immediately applied to an already-running CLI session; start a new session or resume after exiting. Copilot CLI is evolving, so confirm current behavior with /help and the current command reference before depending on an option in automation.

Evidence

official

Sources