Two ways to talk to Copilot from your terminal

GitHub Copilot CLI gives you two distinct ways to work with an AI assistant without leaving your shell: interactive mode and non-interactive mode. Both run the same underlying agent, but they're built for different workflows. Knowing when to use each can save you time and keep your terminal session focused.

Interactive mode: a running conversation

Launching copilot from the command line puts you straight into interactive mode. This is the default experience, and it behaves like a chat session: you ask a question, review the response, then follow up with another prompt or a new question without ever leaving the session.

The appeal here is iteration. You can ask Copilot "How do I run this project locally?", get instructions, and then push further with "Can you run it for me?" Copilot will analyze your project and start the server itself. You can then inspect the result, request changes, and keep working in the same conversational context.

When you first start a session, Copilot may ask you to trust the current folder, since it needs permission to read and modify files in that directory.

Non-interactive mode: one-shot prompts

Non-interactive mode skips the session entirely. You pass a single prompt directly in the command line and get a response almost immediately, then you're back to your normal shell flow. To enter it, exit any active Copilot session and run copilot -p followed by your prompt, for example:

copilot -p "Quickly summarize what this repository does and the key folders."

This mode is built for tasks where you don't need follow-up: summarizing a repository, generating a code snippet, or dropping Copilot into an automated script. Because there's no session overhead, it's the fast path when you already know exactly what you need from the agent.

The two modes complement each other. Use interactive mode for exploratory work where you expect to refine your questions as you go. Use non-interactive mode for quick, well-defined requests that shouldn't interrupt your terminal rhythm.

Resuming a previous session

Both modes support resuming past sessions. If you're already inside an interactive session, type /resume to see a list of previous sessions and pick one to restore. From the regular command line, you can jump straight into the same picker with copilot --resume.

That's useful when you've been working on a task across multiple terminal visits and want to recover the full conversation context rather than starting from zero.

Beyond these two modes, Copilot CLI also supports slash commands and MCP servers, topics covered elsewhere in the GitHub Copilot CLI for Beginners series.