Task-led tool guide · official GitHub docs checked Nov 3, 2026
When does GitHub Copilot CLI fit a coding task?
For a task you want to supervise in a terminal, start with interactive mode; use plan mode before multi-step changes. Choose programmatic `-p` for a bounded scripted prompt, or cloud delegation when work should continue remotely as a draft pull request. Check permissions before granting access.
What is GitHub Copilot CLI?
GitHub documents Copilot CLI as a terminal interface for asking questions, writing or debugging code, and interacting with GitHub.com. It can work iteratively on a project and, in the documented cloud-agent flow, create a draft pull request. Check the current feature and policy documentation for your plan and organization.
When should I use interactive mode or plan mode?
Use an interactive session when you want to steer work as it proceeds. GitHub documents ask/execute and plan modes; plan mode creates a structured plan before code is written. For a change with several steps or unclear scope, review that plan and correct it before moving into implementation.
Can I run Copilot CLI in a script?
GitHub documents a programmatic interface using `-p` or `--prompt`. A prompt that modifies files or runs commands also needs an approval option. Start with a narrow, reviewable task, specify only the tools it needs, and inspect output and file changes before using the command in an automated workflow.
What is the difference between local autopilot and cloud delegation?
GitHub documents autopilot as autonomous work in the local CLI session, requiring full permissions for the documented hands-free mode. The `/delegate` command sends work to GitHub Copilot cloud agent, which works remotely, creates a branch, opens a draft pull request, and requests review. Choose based on where the work should run and how you want to supervise it.
What should I check before granting permissions?
Review every requested shell command and file change. GitHub documents scoped tool allow and deny options, with deny rules taking precedence over allow rules. Its security guidance also says to launch the CLI only from directories you trust and cautions that permission scoping is heuristic. Prefer a narrow tool set and a clean branch for a trial.
How can I evaluate whether the CLI fits my repository?
Choose one small issue with clear acceptance criteria and use a clean branch or restorable copy. Record the CLI version, mode, prompt, allowed tools, and any approvals; inspect the diff and run the project checks yourself. This tells you about fit in your setup, not general coding quality or comparative performance.