NEW: Claude Code Security — research preview →

Chat

Chat surfaces, context, session configuration, and reviewing AI changes

Read time: 5 min

title: "Chat" description: "Chat surfaces, context, session configuration, and reviewing AI changes" section: "Copilot" readTime: "5 min"

Copilot Chat

Chat enables natural language AI assistance for coding tasks. Three surfaces are available in VS Code, each optimized for different workflows.

Chat Surfaces

SurfaceShortcutBest for
Chat viewCtrl+Alt+I (Ctrl+Cmd+I on macOS)Multi-turn conversations, agents, multi-file edits
Inline chatCtrl+I (Cmd+I)In-place edits in editor or terminal
Quick ChatCtrl+Shift+Alt+LQuick questions without leaving current view

Start a new chat with Ctrl+N (Cmd+N). For managing many sessions across projects, use the dedicated Agents window (code --agents).

Configure Your Session

When starting a chat session, these settings shape behavior:

  1. Session type — where the agent runs (local, Copilot CLI, cloud)
  2. Agent — role/persona (Agent, Plan, Ask, or a custom agent)
  3. Permissions — how much autonomy: Manual permissions (default), Allow all, and Autopilot (an agent mode that also answers blocking questions and retries on errors)
  4. Language model — which AI model powers the conversation, or Auto

Adding Context

MethodWhat it provides
ImplicitActive file and current selection (automatic)
#file / #folder / #symbolExplicit file/folder/symbol reference
#codebaseSemantic search across the workspace
#fetchContent from a web URL
#searchResultsResults from the Search view
@vscode / @terminal / @githubDomain-specific participants (where supported)
VisionAttach images (screenshots, UI mockups) with a vision-capable model
Drag & dropDrop files from Explorer or editor tabs onto Chat

Type # in the input to browse everything you can attach. Agents pick tools on their own, so you rarely need to name one.

Submit Your First Prompt

  1. Open Chat view (Ctrl+Alt+I)
  2. Choose Local as the session type
  3. Select Agent from the agent picker
  4. Type a prompt and press Enter:
Create a basic calculator app with HTML, CSS, and JavaScript
  1. Review suggested changes and Keep or Undo

Review and Manage Changes

After the AI edits files:

  • Inline diffs — review edits in the editor or the chat thread before keeping them
  • Checkpoints — hover over a request and select Fork Conversation to branch from that point; roll back with checkpoints (chat.checkpoints.enabled)
  • /fork — copy the whole conversation into a new session (titled "Forked: ...")

Query Chat History with /chronicle

/chronicle provides insights from your previous sessions. It is also available in the GitHub Copilot app, where /chronicle cost tips surfaces expensive usage patterns.

/chronicle what files did I change last Tuesday?
/chronicle find the session where I fixed the auth bug

The local session index is controlled by github.copilot.chat.localIndex.enabled.

Getting Better Responses

  • Be specific: reference files, symbols, use / commands
  • Add custom instructions for project-wide coding standards
  • Use /compact when the conversation grows too long
  • Start new sessions for unrelated tasks (context pollution degrades quality)
  • Use the language model picker to switch to a model better suited for the task

Troubleshooting Responses

Use the Agent Debug Logs panel (Chat view ... menu) to inspect tool call sequences, LLM requests, token usage, and prompt file discovery. Use the Chat Debug view for the raw system prompt and tool payloads. In an Agents window session, /troubleshoot #session analyzes a session's logs. See Troubleshooting.