Examine GitHub Copilot's quick fix options
GitHub Copilot provides quick fix options that address coding issues, test failures, and problems detected in the command terminal. Quick fix options include:
- Smart action: The Fix smart action is a contextual action that can be used to fix coding errors without writing a prompt.
- Slash command: The
/fixslash command is available in the Ask agent, Inline Chat sessions, and the Quick Chat window. - Code actions: "Fix" code actions, such as Fix using Copilot, are displayed in the Visual Studio Code interface when GitHub Copilot detects certain issues.
Fix coding issues using the Fix smart action
The Fix smart action is accessible from the context menu in the editor, and can be used to address coding issues without writing a prompt.
To fix a coding issue using the Fix smart action:
Open your application code file.
Select the code you want to fix.
Right-click the selected code, and then select Generate Code > Fix.
GitHub Copilot opens an Inline Chat session to display a code update suggestion directly in the editor. Select Accept or Close to accept or discard the suggested fix.
Optionally, refine the suggested code update by submitting a prompt that provides additional context.
Alternatively, if there's a compile or linting problem in a code file, GitHub Copilot shows a code action (sparkle icon) in the editor when you hover the mouse pointer over the issue.

Fix testing errors
GitHub Copilot integrates with the Test Explorer in VS Code and can help with fixing failing tests.
In the Test Explorer, hover over a failing test.
Select the Fix Test Failure button (sparkle icon).
Review and apply GitHub Copilot's suggested fix.
Alternatively, you can:
Open the Chat view.
Enter the
/fixTestFailurecommand.Follow GitHub Copilot's suggestions to fix the test.
Note
The Agent monitors the test output when running tests, and automatically attempts to fix and rerun failing tests. Using the Agent to monitor test output can help you quickly identify and resolve issues in your code. However, when you use the Agent, GitHub Copilot may make multiple premium requests to complete a single task. Premium requests can be used by user-initiated prompts and follow-up actions GitHub Copilot takes on your behalf. The total premium requests used depends on the complexity of the task, the number of steps involved, and the model selected.
Fix terminal errors
When a command fails to run in the terminal, GitHub Copilot displays a sparkle icon in the gutter that offers a Quick Fix to explain what happened.

Summary
GitHub Copilot provides quick fix options that address coding issues, test failures, and problems detected in the command terminal. Quick fix options include the Fix smart action, the /fix slash command, and "Fix" code actions. The Fix smart action is accessible from the context menu in the editor, and can be used to address coding issues without writing a prompt. The Fix smart action can also be used to fix testing errors and terminal errors.