Skip to content

Add destructive command guard for smooth command auto-approval #1049

Description

@navedmerchant

Is your feature request related to a problem? Please describe.
Modern models increasingly execute complex commands and generate entire scripts to complete tasks. GPT-5.6 is one example. Even when command execution is auto-approved, command allowlists and parsing can interrupt these workflows, causing an otherwise autonomous task to stop for approval or fail to progress.

At the same time, broadly auto-approving every command without a safety boundary would remove the user's opportunity to review genuinely dangerous operations.

Describe the solution you'd like
Integrate Destructive Command Guard (DCG) with command execution and auto-approval. When command auto-approval and DCG are enabled:

  • Commands classified as safe by DCG should execute smoothly without being constrained by the command allowlist.
  • Commands classified as dangerous should still require explicit user approval.
  • If a dangerous command is denied, the chat should show a clear, localized explanation, including the DCG reason or rule when available.
  • DCG should be downloadable and manageable from Auto-Approve settings, with its enabled state persisted across extension and webview state.
  • The existing allowlist and denylist workflow should remain available when DCG is disabled.

This preserves user control at the dangerous-command boundary while allowing modern models to run complex, multi-line, or script-based commands without unnecessary interruptions.

Describe alternatives you've considered

  • Continue expanding command allowlists. This does not scale to generated scripts or novel compound commands and still produces interruptions.
  • Auto-approve every command unconditionally. This is smooth but removes the user's chance to inspect destructive commands.
  • Rely only on the existing denylist. Static patterns cannot classify the full context of complex generated commands as effectively as DCG.

Additional context
The intended UX is that normal command execution stays uninterrupted, while DCG-classified dangerous commands pause and give the user a clear chance to approve or deny them. This is especially important as newer models increasingly write and execute complete scripts as part of routine task completion.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions