AI features cheat sheet

Find the AI feature in Visual Studio Code that fits your task, take the first action, and follow the linked guide when you need more detail.

The agent examples use the Copilot harness in the Chat view, unless noted otherwise. New to agents? Complete your first task with recommended defaults. Available features depend on your model, account, and organization policies.

Jump to:

Choose a feature

Select Ask or Agent in chat, type /plan to plan a change, or select code and press ⌘I (Windows, Linux Ctrl+I) for inline chat. Adapt the examples to your project and attach relevant code or error output.

Task Feature Example prompt
Understand code without changing it Ask "Where is sign-in validated?"
Plan a change or feature Plan "/plan Add pagination without breaking existing clients"
Build, fix, or test Agent "Fix this failure and run the relevant tests."
Edit selected code inline Inline chat "Handle empty input without changing other behavior."
Validate a web app Browser tools "Submit an empty form and verify the validation message."

For assistance without writing a prompt:

  • Complete code as you type: Review inline suggestions, then press Tab to accept or Escape to dismiss them.
  • Write a commit message: Select the sparkle beside the Source Control message input to generate a message, then review it.

Stay in control

Important

Agents can save edits directly to your project. Manual permissions does not ask for confirmation for every file edit. Review the security baseline before working on an existing project.

I need to... Action
Choose which actions require approval Select a permission level in the chat input. Keep Manual permissions for an interactive first task.
Review changes In the Chat view, open a changed file and use Keep or Undo to accept or revert individual tracked edits. Edits are already saved. In the Agents window, inspect diffs and provide inline feedback in Changes.
Redirect or stop a request Use the Send dropdown to steer, queue, or stop and send. Use Stop to cancel without sending another message.
Undo file changes Hover over an earlier request and select Restore Checkpoint to restore affected files and chat history.
Restrict terminal access Use agent sandboxing.
Keep agent execution off my machine Run the task on a remote host or in a cloud session Cloud sessions is experimental and might change or be removed. . Review permissions for that environment. The agent can still change its files and access connected services.

Stopping doesn't undo completed work. Checkpoints don't reverse terminal commands or changes to external services. If you're unsure how to recover, follow Get an agent back on track.

Shortcuts and common commands

Keyboard shortcuts

Action Shortcut
Open the Chat view ⌃⌘I (Windows, Linux Ctrl+Alt+I)
Start a new chat with focus in the Chat view ⌘N (Windows, Linux Ctrl+N)
Open inline chat with focus in the editor ⌘I (Windows, Linux Ctrl+I)
Open terminal inline chat with focus in the terminal ⌘I (Windows, Linux Ctrl+I)
Open Quick Chat ⇧⌥⌘L (Windows, Linux Ctrl+Shift+Alt+L)
Accept an inline suggestion in the editor Tab
Dismiss an inline suggestion in the editor Escape

For spoken interaction, see Voice Mode Voice Mode is experimental and might change or be removed. and built-in dictation Built-in dictation is experimental and might change or be removed. .

Slash commands

These commands work in Copilot harness sessions. Type / in the chat input to see available commands and installed skills.

Command Purpose
/plan <task> Research the task and propose a plan before implementation.
/compact Summarize earlier conversation context.
/fork Copy the conversation with its history to explore another approach. Forking doesn't isolate file changes.
/<skill-name> Run an installed skill by name.

Get better results

Combine the task, constraints, and verification in one request:

Find the cause of the failing authentication test.
Fix the implementation without changing the expected behavior.
Run the relevant tests and summarize the change and results.
I need to... Action
Ground a request in my code Select Add Context or type # to attach files, symbols, or other context. Include relevant errors and test output.
Balance quality, speed, and cost Use the model picker, or Auto when available. Changing the model doesn't change the harness.
Use another agent provider Open Session Target and choose a harness. Check its account and tool requirements.
Use my own model credentials Follow BYOK setup for Copilot sessions. BYOK models in Agent Host is experimental and might change or be removed. Inline suggestions and semantic search still require the GitHub Copilot service.
Reuse knowledge across conversations Ask the agent to remember a durable convention with Copilot Memory. Review and delete cloud memories on GitHub.

Agents can search your workspace and choose tools automatically. See workspace context for what they can find, and AI credit usage guidance to manage conversation cost.

To search yourself without exact keywords, use semantic code search (Preview) or AI settings search.

Customize and scale up

Tailor agents to your project

Run Chat: Open Customizations to open the Agent Customizations editor for your selected session. Start with a recurring need, rather than configuring every option.

I want to... Use
Apply project conventions Instructions for coding standards and test commands.
Reuse a task or multi-step workflow Agent skills, loaded when relevant or invoked by name.
Define a specialized role Custom agents with focused instructions and tools.
Connect an external service Copilot connectors Copilot connectors is in preview and might change before it becomes generally available. for supported services without server setup, or MCP servers you configure yourself.
Run commands at workflow events Hooks supported by your harness.
Install a packaged setup Agent plugins from community or organization marketplaces.

Coordinate and continue work

I want to... Start with
Manage independent tasks Select Open in Agents to use the Agents window. Use separate worktrees when changes must stay separate.
Delegate part of a task Ask for a subagent to investigate a bounded question and report back.
Continue work from another device Register your host through Remote Connections with GitHub environments. GitHub environments is in preview and might change before it becomes generally available. Keep the host running and reachable.
Work without keeping my machine online Follow cloud session setup, then select Cloud for a new session. Cloud sessions is experimental and might change or be removed.
Repeat a task automatically Select Automations in the Agents window to create an automation. Review a manual run before scheduling it.

For unattended repository work, cloud automations Cloud automations is in preview and might change before it becomes generally available. run on GitHub without keeping your computer online.

Next steps