AI features cheat sheet
Find the AI feature in Visual Studio Code that fits your task, from a focused edit to work you delegate to an agent. Use this reference for common tasks, useful controls, and shortcuts.
New to agents? Complete your first task with an agent. Available features depend on your agent harness, model, account, and organization policies.
Choose a feature
| I want to... | Use | Start with... |
|---|---|---|
| Understand unfamiliar code | Chat | Ask "Trace how a request reaches the database." |
| Plan a complex change | Plan agent | Select Plan and describe the change to research before implementation. |
| Build a feature, fix a bug, or create a project | Agents | Select Agent, describe the outcome, and specify how to verify it. |
| Make a focused edit | Inline chat | Select code in the editor and describe the change. |
| Get help while typing and editing | Inline suggestions | Accept ghost text to complete code, or use next edit suggestions to navigate to and apply a related edit. |
| Manage independent tasks across projects | Agents window (Preview) | Select Open in Agents in the title bar, then start and monitor sessions. |
| Delegate work that returns a pull request | Cloud agents | Choose the Cloud session target and a repository. |
| Check a web app's behavior | Browser tools | Ask the agent to open the app, test a user flow, and report the result. |
| Repeat routine work on a schedule | Automations Automations is in preview and might change before it becomes generally available. | Save a prompt and schedule in the Agents window. |
| Generate commit messages or rename symbols | Smart actions | Use the sparkle action or editor context menu without writing a prompt. |
| Explore data or edit a notebook | AI for notebooks | In a Local agent session, ask the agent to create, edit, and run notebook cells. |
| Find code or settings without exact keywords | Semantic search (Preview) and AI settings search | Search by meaning in the Search view, or describe a setting in the Settings editor. |
Use agents
Use the Chat view to work beside your code, or the Agents window to focus on assigning higher-level tasks and reviewing outcomes.
For a complex change, plan, implement, verify, then review:
- Plan: Ask the Plan agent to research the change and identify risks. Review the approach before handing it to an implementation agent.
- Implement: Describe the intended behavior and constraints. The agent searches your code, edits files, and uses tools.
- Verify: Ask the agent to run relevant tests or exercise the app. Inspect what it actually checked.
- Review: Review the diff and validation results before committing or merging.
For example, give the agent a concrete browser check:
Open the app and test the sign-up flow with a missing email address.
Verify that it shows a validation error and does not submit the form.
Report what you tested and any problems you found.
To organize larger tasks:
- Use separate sessions and worktrees for independent tasks that should not share code changes.
- Use subagents to delegate a focused part of a task in a separate context.
- Hand off a session when you want to continue work with another supported session target.
Get better results
| Need | What to use |
|---|---|
| Ground a request in specific code or a failure | Add context with Add Context, #-mentions, or dragged files. Attach relevant code, errors, test output, or GitHub issues. |
| Explore the codebase without finding every file yourself | Let the agent gather workspace context with search and language tools. |
| Balance reasoning, speed, and cost | Use the model picker, or Auto when available. Changing the model does not change the agent harness. |
| Work with another agent provider | Choose a harness, such as Copilot, Anthropic Claude, or OpenAI Codex. Check its tools, authentication options, and setup requirements. |
| Use your own model provider or a local model | Configure bring your own key (BYOK). Inline suggestions and semantic search still require the GitHub Copilot service. |
| Retain useful knowledge across conversations | Ask the agent to remember it with memory. Use Chat: Show Memory Files to inspect stored notes. |
| Manage a long conversation or its cost | Check context usage, compact the conversation, or start a new chat for an unrelated task. See usage guidance. |
Stay in control
| I need to... | Action |
|---|---|
| Decide which actions need confirmation | Choose a session permission level and review tool requests. Allow all bypasses confirmations and should not be treated as a prerequisite for using agents. |
| Redirect work in progress | Steer, queue a follow-up, or stop the request. Stopping does not undo completed actions. |
| Inspect or undo agent changes | Review the diff, provide feedback, or restore a checkpoint. Validate the result before integrating it. |
| Restrict terminal access to files and the network | Use agent terminal sandboxing (Preview on macOS, Linux, and WSL2, Experimental on Windows). A Git worktree separates code changes, but is not a security boundary. |
| Ask AI to review my code | Use code review smart actions. This generates review feedback, not a replacement for your review of agent changes. |
Agents can save edits directly to the session's folder or worktree. Manual permissions does not ask for confirmation for every file edit. Review the security baseline before working on an existing project.
Customize your workflow
| I want to... | Use |
|---|---|
| Apply project conventions without repeating them | Instructions for coding standards, architecture, and test commands. |
| Package a workflow with supporting scripts or examples | Agent skills, loaded when relevant or invoked by name. |
| Run a saved prompt on demand | Prompt files, invoked as slash commands. |
| Define a specialized role and tool selection | Custom agents, such as a read-only reviewer. |
| Connect a database, issue tracker, or other external system | MCP servers that provide tools. |
| Run a command at a specific agent lifecycle event | Hooks, rather than relying on the model to follow an instruction. |
| Install a packaged set of customizations | Agent plugins. |
Use the Agent Customizations editor to create and manage these options for your selected harness.
Debug and fix problems
| Task | Starting point |
|---|---|
| Generate tests | Select code and use Generate Code > Generate Tests, or ask an agent to add and run tests with your project's framework. |
| Diagnose a failing test | Select Fix Test Failure in the Test Explorer, or attach the failure output to chat. |
| Fix a compiler or linting error | Use the editor Code Action (lightbulb), or attach the problem to chat. |
| Configure a debugging session | Ask for a debug configuration, or use copilot-debug (Preview) before a terminal run command, such as copilot-debug python foo.py. |
Combine the task, constraint, 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.
See smart actions for tests and errors and debugging.
Essential keyboard shortcuts
| Action | Shortcut |
|---|---|
| Open the Chat view | ⌃⌘I (Windows, Linux Ctrl+Alt+I) |
| Start a new chat | ⌘N (Windows, Linux Ctrl+N) |
| Open editor inline chat | ⌘I (Windows, Linux Ctrl+I) |
| Open terminal inline chat | ⌘I (Windows, Linux Ctrl+I) |
| Open Quick Chat | ⇧⌥⌘L (Windows, Linux Ctrl+Shift+Alt+L) |
| Accept an inline suggestion | Tab |
| Dismiss an inline suggestion | 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. .
Chat reference
Chat tools
Agents choose tools automatically. You do not need to name every tool in your prompt. Type # to browse available tools and context items, or reference a tool to direct the agent to a capability. See the Tools and context reference for individual names.
Slash commands
Type / to see commands available in the current session. Availability depends on the chat surface, harness, role, and enabled features.
| Command | Purpose |
|---|---|
/plan |
Research and propose an implementation plan. |
/explain, /fix, /tests |
Explain code, suggest a fix, or generate tests. |
/doc |
Generate documentation comments from editor inline chat. |
/setupTests (Experimental) |
Get help choosing and setting up a test framework. |
/new, /newNotebook |
Scaffold a workspace, file, or notebook. |
/compact, /fork |
Compact context, or branch the conversation with its history. |
/clear |
Start a new chat and archive or mark the current chat as done. |
/rename <name>, /help |
Rename a local chat, or list commands and agents in a local Ask chat. |
/models, /tools |
Open the model picker, or configure tools for a local chat. |
/init |
Generate or update workspace instructions in a local agent session. |
/agents, /instructions, /skills, /prompts, /hooks |
Configure the corresponding customization type. |
/create-agent, /create-instructions, /create-skill, /create-prompt, /create-hook |
Generate a customization in a local agent session. |
/troubleshoot |
Analyze agent debug logs in a local or Copilot CLI session. |
/debug |
Open the Chat Debug view from the Chat view, not the Agents window. |
/sandbox-policy |
Inspect the effective sandbox policy for a Copilot Agent Host session. |
/<name> |
Invoke an agent skill or reusable prompt by name. |
For example, a skill in .github/skills/webapp-testing/SKILL.md can be invoked with /webapp-testing. For permission and Autopilot commands, see approvals and permissions.
Chat participants
In chat surfaces that support participants, type @ to choose a specialist. Use @github for repositories, issues, and pull requests, @terminal for shell questions, or @vscode for editor features and settings. For example, @vscode /search generates a Search view query.