Fixing GitHub Copilot Agent Mode Hang in Visual Studio 2022
I was running into an issue with GitHub Copilot’s Agent Mode in Visual Studio 2022 where it would hang indefinitely after executing a command. This was particularly frustrating as it disrupted my workflow and made it difficult to use the tool effectively.
As it turns out, the issue is pretty straightforward to resolve. Apparently it tries to use the Powershell 7 terminal. In my installation, this was misconfigured and was pointing to some non-existent path. In my case, it was pointing to C:\Program Files\Microsoft\Azure Functions Core Tools\workers\powershell\7.4\zh-Hans\pwhs.exe, which does not exist on my system. You can check the path by opening the terminal window (CTRL +` or View->Terminal).
Continue Reading