GitHub Copilot CLI runs in two distinct modes: interactive and non-interactive. Interactive mode is the default, launched with a single `copilot` command, and opens a persistent session where you iterate with follow-up prompts, ask Copilot to execute tasks like starting a local server, and retain full context across the exchange. Non-interactive mode, triggered with `copilot -p` plus an inline prompt, returns a single answer and drops you back in your shell, no session required.
The practical split is this: interactive mode suits exploratory work where the problem is not fully defined, non-interactive mode suits scripted or time-critical tasks like summarizing a repo or generating a snippet inside an automated workflow. Session continuity is handled by `/resume` inside interactive mode or `copilot --resume` from the command line, restoring prior context without re-explaining the project.
The article is worth reading in full for the exact command syntax, the folder-trust permission step that catches new users off guard, and the concrete prompt examples that show how each mode behaves differently against the same codebase. Upcoming entries in the series cover slash commands and MCP server integration with Copilot CLI.
[READ ORIGINAL →]