Varun Vemulapalli

Day 57 of 100 ยท Phase 7: GitHub Copilot

Agent mode in VS Code: Copilot editing across files

2 min readBy Varun Vemulapalli

Most real changes touch more than one file: a button here, a function there, a test somewhere else.

That's where finishing your line stops helping, and an agent starts.

Video explainer ยท 1:46
Key takeaway

In Agent, Copilot plans and edits across files, and your job becomes clear criteria and careful review.

Day 57 visual: Agent mode in VS Code: Copilot editing across files
The visual from the original post.

The concept

Agent (in VS Code Chat, often called "agent mode"): you describe a goal; Copilot plans, finds the right files, edits them, can run commands like tests, and checks the result. The agent loop from Day 33, in your editor.

Chat has built-in agents you pick from a dropdown:

  • Ask: answers questions, changes nothing.
  • Plan: drafts a step-by-step plan for you to approve.
  • Agent: plans, edits, runs commands and validates.

Permissions: what it may do without asking. With manual permissions it asks before running tools.
Checkpoint: a saved point you restore to undo its file changes.

Walkthrough: "export to CSV" in a to-do app

Three files: index.html (page), app.js (logic), styles.css (look). Users want their tasks as a spreadsheet.

1. Open the folder in VS Code, open Chat, choose Agent.
2. Prompt: "Add an Export to CSV button next to Add Task. It downloads tasks.csv with columns title, due date, done. Follow the existing style."
3. Copilot reads all three files and plans: a button in index.html, a function in app.js, a style in styles.css.
4. It edits them. You review a diff per file: green added, red removed.
5. Test: add 3 tasks, click Export. Expect a header row plus 3 rows.
6. A title like "Buy milk, eggs" breaks the columns. Tell it: "Titles with commas break the CSV. Fix it and add a test."
7. Happy? Commit. Not? Restore a checkpoint and write a clearer prompt.

Where you see it at work

  • Banking: a new field in a statement export touches screen, logic and tests.
  • Insurance: renaming a policy field across forms and reports.
  • Healthcare: a new column in an appointment list, end to end.
  • Retail: a "download orders" option for store managers.
  • Product and BA: clearer acceptance criteria, better agent plans.

The agent is fast, not accountable. You still review every diff.

Try it today (10โ€“15 min)

1. In Agent, ask: "Create a tiny to-do web app: index.html, app.js, styles.css."
2. Then ask for Export to CSV with the prompt above.
3. Review each diff.
4. Test with a title containing a comma.
5. Docs: https://code.visualstudio.com/docs/agents/overview and https://code.visualstudio.com/docs/agents/agents-tutorial

In one sentence

In Agent, Copilot plans and edits across files, and your job becomes clear criteria and careful review.

What small feature at your work touches more files than people expect? ๐Ÿ‘‡