Task Execution Settings

Table of Contents

  1. workspaceTasks.task.confirmPatterns
  2. workspaceTasks.task.presentationOptions
    1. workspaceTasks.task.presentationOptions.reveal
    2. workspaceTasks.task.presentationOptions.clear
    3. workspaceTasks.task.presentationOptions.close
    4. workspaceTasks.task.presentationOptions.echo
    5. workspaceTasks.task.presentationOptions.focus
    6. workspaceTasks.task.presentationOptions.panel
  3. workspaceTasks.task.stopGracefulDelayMilliseconds
  4. workspaceTasks.task.stopCompoundDependencies
  5. Related

workspaceTasks.task.confirmPatterns

v1.8.0 — New setting

   
Type: array of string
Default: []
Scope: resource

Array of regular expression strings (case-insensitive) matched against task labels. Any task whose label matches at least one pattern will require confirmation before it runs. This is the pattern-matching source for the Run Guard feature.

Patterns are evaluated against the task’s original label (before any grouping prefix is added). Invalid regex strings are silently skipped.

Example:

{
  "workspaceTasks.task.confirmPatterns": [
    "deploy.*",
    "db:drop",
    "terraform apply",
    ".*:prod$"
  ]
}
Pattern Matches
deploy.* deploy, deploy-prod, deploy to staging
db:drop db:drop (exact)
.*:prod$ deploy:prod, release:prod
terraform Any label containing terraform

Combine confirmPatterns with the Manual Toggle and the Definition Flag for layered protection. All three sources may be active at once — the dialog only appears once per run regardless.


workspaceTasks.task.presentationOptions

   
Type: object
Default: {}
Scope: resource

Default terminal presentation options applied to every task run by the extension. These mirror the standard VS Code task presentation block. Individual tasks can still override these values in their own task definition.

workspaceTasks.task.presentationOptions.reveal

   
Type: string
Default: "always"
Options: "always", "silent", "never"
Scope: resource

Controls whether the task output panel is revealed when the task starts.

  • always - Always open and reveal the terminal panel
  • silent - Reveal the panel only if the task fails
  • never - Never reveal the panel automatically

workspaceTasks.task.presentationOptions.clear

   
Type: boolean
Default: false
Scope: resource

When true, the terminal is cleared before executing the task.

workspaceTasks.task.presentationOptions.close

   
Type: boolean
Default: false
Scope: resource

When true, the terminal is closed after the task completes.

workspaceTasks.task.presentationOptions.echo

   
Type: boolean
Default: true
Scope: resource

When true, the command line is echoed in the terminal before execution.

workspaceTasks.task.presentationOptions.focus

   
Type: boolean
Default: false
Scope: resource

When true, the terminal panel receives focus when the task starts.

workspaceTasks.task.presentationOptions.panel

   
Type: string
Default: "shared"
Options: "dedicated", "shared", "new"
Scope: resource

Controls which terminal panel is used for the task.

  • shared - Reuse the same terminal panel across tasks
  • dedicated - Use a terminal panel dedicated to this task
  • new - Create a new terminal panel every time the task runs

Example:

{
  "workspaceTasks.task.presentationOptions": {
    "reveal": "always",
    "clear": false,
    "close": false,
    "echo": true,
    "focus": false,
    "panel": "shared"
  }
}

Screenshot - Presentation Options


workspaceTasks.task.stopGracefulDelayMilliseconds

   
Type: number
Default: 5000
Scope: resource

The time in milliseconds to wait after sending a termination signal before forcibly killing the task process. During this window the process may perform clean-up work. Set to 0 to kill immediately without a grace period.

Example:

{
  "workspaceTasks.task.stopGracefulDelayMilliseconds": 5000
}

Screenshot - Stop Graceful Delay


workspaceTasks.task.stopCompoundDependencies

   
Type: boolean
Default: true
Scope: resource

When true, stopping a compound task also stops all of its dependsOn child tasks that are currently running. When false, child tasks are allowed to continue running after the parent compound task is stopped.

Example:

{
  "workspaceTasks.task.stopCompoundDependencies": true
}