- Detect VS Code agent-initiated terminal commands via the
VSCODE_AGENTenvironment variable (VS Code 1.121+). The User-Agent header now reportsagent/vscode-agentwhen set. The previousCOPILOT_MODELheuristic (which reportedagent/copilot-vscode) has been removed; it produced false positives for Copilot CLI BYOK users and never reliably identified VS Code.