You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent Host: bring back granular "sticky" terminal auto-approve controls (allow for session / always allow exact command line) #324136
Building on the recent work to have chat.tools.terminal.autoApprove and chat.tools.terminal.enableAutoApprove respected for Agent Host Copilot (#322633, #322774), I'd like to bring back the more granular, "sticky" approval controls we used to have so users aren't re-prompted for commands they've already OK'd.
Issue:
Today the AH terminal auto-approver (src/vs/platform/agentHost/node/commandAutoApprover.ts) only compiles the forwarded chat.tools.terminal.autoApprove rules and checks each command against them. Unlike the workbench auto-approver (.../chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.ts, which has _getSessionRules and shows "Auto approved for this session"), the AH side has no concept of session-scoped approvals. So once I approve something, there's no way to make it stick for the rest of the session, and I keep getting re-prompted.
This shows up a lot because terminal auto-approve is deliberately picky about sub-commands: a compound command only auto-approves if every parsed segment matches a rule, and things like nested $(...) substitutions, added write redirects, or combos the tree-sitter parser can't decompose will still prompt.
Potential thoughts/plan forward:
Allow <command / combination of commands> for this session
Always allow exact command line <command> (persists to the chat.tools.terminal.autoApprove setting)
Allow all commands in this session — would want to align with the permissions / risk-assessment folks on how this interacts with the session permission model before wiring it up
Pointers for agent:
AH: src/vs/platform/agentHost/node/commandAutoApprover.ts, and sessionPermissions.ts (getAutoApproval, permissionKind === 'shell' path)
Workbench reference for session-scoped rules: _getSessionRules in .../chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.ts
Activity
anthonykim1 commentedon Jul 27, 2026
Allow something like:
anthonykim1 commentedon Jul 29, 2026
We need to use pwsh grammar for pwsh commands ---> #328052
dmitrivMS commentedon Sep 26, 2026
Dupe of #326766?