Microsoft's code editor Visual Studio Code has, since version 1.148, prevented your computer from going to sleep when idle while plugged in, as long as an AI agent is working on a task. The feature is still in the testing phase (preview) and applies to agents in the so-called Agent Host, a separate process alongside the editor window. New Copilot sessions also run there.
The editor itself is free, including for commercial work. For Copilot, you sign in with a GitHub account. Without a subscription, an account that meets the requirements is enabled for Copilot Free with a monthly quota. The German interface comes via a language pack. Commands and settings appear here in their English version.
When does your computer stay awake?
The setting "sessions.keepAwakeWhileWorking" controls the behavior and is set to "whenPluggedIn" by default. VS Code then prevents the computer from entering sleep mode when inactive, as long as it is connected to mains power. With "always" this also happens on battery power, with "never" it doesn't happen at all.
Which value suits you?
The sleep mode setting in VS Code 1.148, still in the testing phase
When should your computer stay awake?
- Plugged in on Windows or macOSwhenPluggedIn, the default
- On a Linux desktop or on battery poweralways
- Never, not even while an agent is workingnever
Linux desktops: VS Code does not detect mains power
Sources: Visual Studio Code, Visual Studio Code Docs
Two minutes after work in the last chat has ended, VS Code allows sleep mode again, as described in the settings reference. The screen is allowed to turn off in the meantime. VS Code also doesn't prevent you from putting the computer into sleep mode yourself. You may close the project window, but for local sessions VS Code must keep running.
On Linux desktops, VS Code does not detect mains power, so with the default setting the computer may still go to sleep there. When connecting from a laptop to a server, only the server's setting counts.
What happens when cleaning up old worktrees?
With version 1.148, you can also clean up old worktrees on connected remote machines, provided they support the feature. A worktree is an additional working copy of your Git project in its own folder, so that the changes for a task stay separate from other files. The command "Chat: Open Worktree Cleanup" is now available in the Command Palette and in the menu of the chat view. You can learn how to record changes with commits and find them again in the history in the course on version control with Git.
Before removal, VS Code saves all non-ignored changes, including new files, as a commit in the respective branch. Files that Git ignores, however, are deleted according to the guide to worktrees, so it's best to copy out local configuration such as the ".env" file beforehand.
What else does version 1.148 bring?
- Password prompts from sudo, ssh, or Git appear in Copilot sessions as a question in the chat. Only the respective program receives your answer; the language model does not get it.
- Speed: According to Microsoft, chat responses in the Agent Host should start on average 30 percent faster than in the previous stable version.
- Dev Containers, that is, isolated Linux environments in Docker, can be created for agents without their own configuration. The feature is experimental and disabled by default.
- Sandbox profiles (experimental) define for each remote machine what an agent's commands may access.
What this means for you
For a long overnight job, the default setting is enough when plugged in on Windows or macOS; on a Linux desktop, it's best to set "always". With "never," your computer goes to sleep as usual.
The development team already named a fixed date on November 18 in the blog post about the new default: In February 2027, "Local" disappears, that is, the older program layer through which the agent coordinates model, tools, and changes. It's best to open "Chat: Open Customizations" and there "Migrations". Hooks, that is, custom scripts at fixed points in a process, are not converted automatically. From regularly used prompt files, you make skills, that is, folders with instructions that the agent loads when needed.
When a password prompt appears in the chat, it's best to first read the command it belongs to. Our news on Claude Code shows how credentials can end up in plain text in a file via a permanent approval.
Microsoft released version 1.148 on November 25, 2026.
Sources