Copilot keeps asking for permission to run bash command. How can I always approve it? #187251
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Hey 👋 |
Beta Was this translation helpful? Give feedback.
-
|
Currently, GitHub Copilot Agent Mode requires manual confirmation for shell commands as a security measure to prevent accidental or malicious execution of destructive commands. There is no 'Always Approve' setting for bash commands at this time to ensure users maintain control over their environment. You may want to provide this feedback via the 'Share feedback' option in the Copilot menu. |
Beta Was this translation helpful? Give feedback.

Hey 👋
Yeah, this is really expected behavior with Copilot Agent Mode . It asks for permission before running bash commands because it treats last execution as a possibly erogenous action . It’s basically a safety feature so extensions (or AI) don’t run commands automatically without your approval. That said , I understand it can get bothersome when you’re doing normal dev work and it keeps prompting.
A few things you can try:
✅ 1. Check Copilot Agent settings in VS Code.
Go to: Settings → search for “Copilot” or “Agent”.
Look for options related to:
. Command execution
. last confirmations
. Auto approve safe commands
Depending on your version, there may be an option to reduce confirmatio…