Use Copilot agent mode for multi-step coding work

Hand Copilot agent mode larger coding jobs that need file selection, command runs, and repeated fixes, not just quick text edits.

Done with GitHub Copilot· Intermediate

What they did
A commenter described using GitHub Copilot’s agent mode for involved programming tasks where the agent has to choose which files matter, inspect the codebase, run commands, and keep revising its work. They said it helps most on jobs like version upgrades, test coverage work, refactors, debugging, and build errors. One example started with plan mode to map out a technology upgrade and unit-test changes, then switched to agent mode to carry out the implementation.
How it went
Several commenters reported good results on multi-file refactors and on fixing compile or test failures. They also noted that small, obvious edits can still take longer than just doing them by hand.
Tips
Give the agent repo-specific instructions, and add instruction files, prompts, skills, or custom agents when a project needs repeated context. Use a pause-and-confirm step before any action that would send, delete, or submit something.

Try it yourself with GitHub Copilot

In GitHub Copilot agent mode, handle this task in my [repo]: [describe the coding task]. First inspect the relevant files, choose the ones you need to edit, and run the commands needed to build and test your changes. Keep working through failures and update the code until [tests pass / the feature works]. Before you make any irreversible change such as deleting files, submitting code, or triggering a deployment, stop and ask me to approve it. Do not modify [files or folders to avoid]. When you finish, give me a concise list of every file you changed and the main edits in each one.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.