The current system prompt effectively prevents the use of any run-command tool other than the built-in `run_in_terminal`.
Name: GitHub Copilot Chat Id: GitHub.copilot-chat Description: AI chat features powered by Copilot Version: 0.31.2025081101 Publisher: GitHub VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Version: 1.104.0-insider Commit: 05a5962257a7e10d61d798d48dc9bb8eb38f6d4c Date: 2025-08-11T05:03:43.048Z Electron: 37.2.3 ElectronBuildId: 12035395 Chromium: 138.0.7204.100 Node.js: 22.17.0 V8: 13.8.500258-electron.0 OS: Darwin arm64 24.6.0
The current system prompt effectively prevents the use of any run-command tool other than the built-in run_in_terminal. If run_in_terminal is disabled in the tool selection, the system prompt says: “You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a code block with the suggested command.”
This wording blocks the agent from recognizing or using third-party run-command tools. For instance, I built a run-command tool that runs commands in a sandbox using sandbox-exec, but the current prompt makes such use cases impossible.
Although the system prompt can be partially overridden using .github/copilot-instructions.md, it would be far better to make it adaptable to third-party tools.
Source:
https://github.com/microsoft/vscode-copilot-chat/blob/7ef1f6aa006ee48e9d2490cd9ef476c43effbb3b/src/extension/prompts/node/agent/defaultAgentInstructions.tsx#L85
@roblourens any concerns with removing this? Added before https://github.com/microsoft/vscode-copilot-chat/commit/af813ee4bf9ee121e68039618c7deb95ae2dc60b, presumably because people were disabling the tool and not knowing how to bring it back or out of an abundance of caution for that?
@tamuratak FYI we will support doing similar in the built-in tool soon: https://github.com/microsoft/vscode/pull/280236
If the tool is disabled, and the agent wants to run a terminal command, then some models will thrash around and do crazy things trying to run terminal commands. This is still an issue with the edit tools and gpt models at least. Maybe it's better these days with modern models. We don't even include those instructions for all models today. You could try it. It's probably ok to remove.
Since the models are trained on having bash available, especially more recently, I don't think it's worth the effort and risk of trying to change this. Disabling the terminal tool and running without it is an important scenario and I don't want to jeopardize that. Plus we'll have this same capability soon so there is little reason to want to replace the tool anyway.