Copilot in VS Code lost the ability to edit files directly, or access powershell. #162682
Select Topic AreaQuestion Copilot Feature AreaGeneral Body"Sorry, I can't assist with that. I'm designed to help with suggesting directory structures for projects. For file operations like opening, editing, and saving files, you'll need to use VS Code's built-in features directly." I'm working on a wordpress child theme, and it's been doing a lot of the heavy lifting. I've set up a docker desktop container running a wordpress site on localhost. Yesterday it was opening and editing files, and then asking for approval. I would refresh the page and see the changes in my browser. I noticed this morning it had switched from making changes and asking for approval before committing them, to suggesting changes without implementing them. So I started a new chat and said simply "what are your capabilities". This was the response: GitHub Copilot CapabilitiesAs your AI programming assistant, I can help with: Code Tasks
File & Workspace Support
Terminal Assistance
General Support
Would you like help with a specific task? So I responded with: "Add a file named test.md, and fill it with a heading, subheadings, and 3-5 paragraphs explaining our conversation so far." To which it replied: Sorry, I can only help with generating directory structures for projects. I can't create or modify the content of specific files. If you'd like me to suggest a directory structure for a project, please let me know what type of project you're working on. We went back and forth, but I can't seem to figure out what's not connecting. I'm on day 2 of a 30 day trial before I'm billed. Day 1 was as expected, Day 2 I'm considering switching to a competitor. |
Replies: 5 comments 5 replies
|
I'm dumb. It's a setting: Ask, Edit, or Agent in the bottom left of the chat window. I'll have to test the difference between Agent and Edit. |
|
It turns out the behavior you're experiencing is caused by the mode selection in Copilot Chat. In the toolbar (bottom-left of the chat window), you have options like Ask, Edit, and Agent. Each of these modes governs what Copilot is allowed to do: Ask: Copilot behaves like a traditional chat assistant—it can answer questions and explain code, but it will not modify files. Edit: Copilot can suggest and apply edits directly to your files. This is what allowed file creation and inline code changes yesterday. Agent: This mode elevates Copilot’s capabilities, letting it use the terminal, run commands, and orchestrate more complex workflows in your environment. It sounds like your session switched from Edit to Ask, which is why Copilot is now generating suggestions without executing them. To restore full file-editing functionality: Click the mode selector in the bottom-left corner of the Copilot Chat panel. Choose Edit if you'd like it to apply changes to the active file directly. Choose Agent for the broadest capabilities, including file and terminal operations. |
|
This seems to have a bug afterall, sometimes you have to re-select the Agent mode, probably after logging in again. Might also be that sometimes selections in other windows affect the selections in others, but those are not visible in the UI. |
|
That's super frustrating! I've seen this exact issue happen to several people recently. The good news is it's usually fixable without switching away from Copilot. Quick fixes to try:
The real culprit is usually workspace context. Copilot sometimes gets "confused" about what it can do in different workspaces. Try:
Also check:
The fact that it worked perfectly on day 1 then suddenly changed suggests either an extension update or workspace permissions issue rather than a fundamental capability loss. Let me know if the restart/sign-out doesn't work - there are a few other things to try before jumping ship! |
|
I was able to do this by following this step Step-by-Step: Enable Copilot Workspace Edits on Windows Go to 👉 https://code.visualstudio.com/insiders/ Click “Windows – User Installer” (the recommended one). When prompted, choose: ✅ Add to PATH ✅ Register as default editor for supported file types (optional) Finish installation and launch VS Code Insiders. |
I'm dumb. It's a setting: Ask, Edit, or Agent in the bottom left of the chat window. I'll have to test the difference between Agent and Edit.