task icon indicating copy to clipboard operation
task copied to clipboard

feat: Command timeouts

Open lox opened this issue 6 months ago • 0 comments

Summary

Add command-level timeout support to prevent commands from hanging indefinitely in task pipelines.

Closes #1569

Usage

version: '3'

tasks:
  deploy:
    cmds:
      - cmd: npm run build
        timeout: 5m

      - cmd: ./deploy.sh
        timeout: 30m

Commands exceeding their timeout are terminated:

task: Failed to run task "deploy": task: [deploy] command timeout exceeded (5m): context deadline exceeded

Implementation Details

  • Timeout applies per command, not per task
  • Works with both shell commands and task calls
  • Deferred commands use separate context and run even if parent times out
  • ignore_error flag does not suppress timeout errors
  • Zero/unspecified timeout maintains current behavior (no timeout)

lox avatar Oct 24 '25 00:10 lox