<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda" -->

---
title: Auto-accepting AI edits in VS Code | daily.dev
description: Copilot's agent mode in VS Code normally pauses after every edit for a Keep/Undo decision. The setting chat.editing.autoAcceptDelay lets edits accept...
canonical: https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Auto-accepting AI edits in VS Code | daily.dev
og:description: Copilot's agent mode in VS Code normally pauses after every edit for a Keep/Undo decision. The setting chat.editing.autoAcceptDelay lets edits accept...
og:url: https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda
og:image: https://api.daily.dev/og/posts/8lj1xccdA.png
og:image:alt: Auto-accepting AI edits in VS Code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-accepting AI edits in VS Code

**[The Art of Simplicity](https://daily.dev/sources/bartwullems)** · 2 min read · 0 upvotes · 0 comments

## Summary

Copilot's agent mode in VS Code normally pauses after every edit for a Keep/Undo decision. The setting chat.editing.autoAcceptDelay lets edits accept automatically after a configurable delay (default 0, which disables it), while chat.tools.edits.autoApprove uses glob patterns to control which files Copilot can edit without asking first, letting you protect sensitive files like .env or .vscode JSON configs. VS Code docs recommend still reviewing changes in source control before committing, since staging accepts pending edits and discarding reverts them. Newer Agent Host sessions skip the pending diff state entirely, saving edits directly into a session folder or isolated Git worktree, making the pre-commit review the only remaining check.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://bartwullems.blogspot.com/2026/09/auto-accepting-ai-edits-in-vs-code.html>

## Questions this post answers

### How do I make VS Code Copilot automatically accept agent edits instead of clicking Keep every time?

Add "chat.editing.autoAcceptDelay": 5 to settings.json, which accepts edits automatically after a delay in seconds instead of requiring manual Keep/Undo clicks. The default value is 0, meaning auto-accept is disabled. You can still hover over the editor overlay controls to cancel the countdown, or use Undo afterward.

_daily.dev surfaces practical Copilot config tips for developers tuning their agent-mode workflow._

### How can I stop Copilot from auto-editing sensitive files like .env in VS Code?

Use the chat.tools.edits.autoApprove setting with glob patterns to control which files Copilot may edit without asking first, for example setting "**/*": true but "**/.env": false and "**/.vscode/*.json": false. Files excluded this way still require a diff review and manual approval before being edited.

_Track configuration patterns like this on daily.dev when locking down AI agent access to sensitive project files._

### Do newer VS Code Agent Host sessions still show a diff before accepting Copilot edits?

No, newer Agent Host sessions skip the pending accept/discard state entirely and save edits directly into the session's folder or an isolated Git worktree. This means reviewing changes in source control before committing becomes the only remaining review step, since there is no per-edit Keep or Undo prompt.

_Developers weighing agent autonomy versus review safety can follow these workflow shifts on daily.dev._

## Similar posts on daily.dev

- [Inline agent mode in preview and more in GitHub Copilot for JetBrains IDEs](https://daily.dev/posts/inline-agent-mode-in-preview-and-more-in-github-copilot-for-jetbrains-ides-akhwgwhfk) · GitHub Changelog · 2 upvotes · 0 comments
- [VS Code goes weekly, gets AI autopilot - what could go wrong](https://daily.dev/posts/vs-code-goes-weekly-gets-ai-autopilot---what-could-go-wrong-0lig7j1sf) · The Register · 0 upvotes · 2 comments
- [You no longer have to wait for Copilot to finish thinking](https://daily.dev/posts/you-no-longer-have-to-wait-for-copilot-to-finish-thinking-pjhlgl2uk) · The Art of Simplicity · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#github](https://daily.dev/tags/github), [#vscode](https://daily.dev/tags/vscode)

[View this post on daily.dev](https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Auto-accepting AI edits in VS Code","url":"https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda"},"datePublished":"2026-09-28T07:02:34.176Z","dateModified":"2026-09-28T07:03:45.732Z","description":"Copilot's agent mode in VS Code normally pauses after every edit for a Keep/Undo decision. The setting chat.editing.autoAcceptDelay lets edits accept...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/890f0df185cfce72f3771a66707e63dd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/890f0df185cfce72f3771a66707e63dd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The Art of Simplicity","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Art of Simplicity","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/52b68c70636d44f0901ae7cd107c9438","url":"https://daily.dev/sources/bartwullems"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,github,vscode","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Art of Simplicity","item":"https://daily.dev/sources/bartwullems"},{"@type":"ListItem","position":3,"name":"Auto-accepting AI edits in VS Code"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/auto-accepting-ai-edits-in-vs-code-8lj1xccda#faq","mainEntity":[{"@type":"Question","name":"How do I make VS Code Copilot automatically accept agent edits instead of clicking Keep every time?","acceptedAnswer":{"@type":"Answer","text":"Add \"chat.editing.autoAcceptDelay\": 5 to settings.json, which accepts edits automatically after a delay in seconds instead of requiring manual Keep/Undo clicks. The default value is 0, meaning auto-accept is disabled. You can still hover over the editor overlay controls to cancel the countdown, or use Undo afterward. daily.dev surfaces practical Copilot config tips for developers tuning their agent-mode workflow."}},{"@type":"Question","name":"How can I stop Copilot from auto-editing sensitive files like .env in VS Code?","acceptedAnswer":{"@type":"Answer","text":"Use the chat.tools.edits.autoApprove setting with glob patterns to control which files Copilot may edit without asking first, for example setting \"**/*\": true but \"**/.env\": false and \"**/.vscode/*.json\": false. Files excluded this way still require a diff review and manual approval before being edited. Track configuration patterns like this on daily.dev when locking down AI agent access to sensitive project files."}},{"@type":"Question","name":"Do newer VS Code Agent Host sessions still show a diff before accepting Copilot edits?","acceptedAnswer":{"@type":"Answer","text":"No, newer Agent Host sessions skip the pending accept/discard state entirely and save edits directly into the session's folder or an isolated Git worktree. This means reviewing changes in source control before committing becomes the only remaining review step, since there is no per-edit Keep or Undo prompt. Developers weighing agent autonomy versus review safety can follow these workflow shifts on daily.dev."}}]}
```

