In VS Code, agent tool calls and terminal commands need approval unless settings auto-approve them by tool or by command rule. Enterprise policies can switch off global auto approval and rule-based terminal approval. A 2025 vulnerability showed the stakes: injected instructions could edit workspace settings to enable auto approval and then run code.
Read in this order
- OfficialVS Code: Use tools with agentsStart here: how tool and terminal approvals work and where to tune them.
- ArticleGitHub Copilot: Remote code execution via prompt injection, CVE-2025-53773 (Embrace The Red)The real exploit that flipped auto approval through a settings edit.
- OfficialVS Code: Manage AI settings in enterprise environmentsThe enterprise policies that lock auto approval off for everyone.