Skip to content

[feat]: Teardown hook for task deletion #701

@rabanspiegel

Description

@rabanspiegel

Feature Summary

Add a teardown hook that runs when a task is deleted (or archived via soft-delete).

Config

// .emdash.json
{
  "scripts": {
    "setup": "npm install",
    "teardown": "echo 'Task done'"
  }
}

Environment Variables

The script would receive:

  • EMDASH_TASK_NAME
  • EMDASH_TASK_ID
  • EMDASH_WORKTREE_PATH
  • EMDASH_PROJECT_PATH
  • EMDASH_BRANCH

Execution

  • Fire and forget (non-blocking)
  • Runs from project root (not worktree, since it's being deleted)
  • Failure doesn't block deletion

Use Cases

  • Back up uncommitted work
  • Log completed tasks
  • Stop related processes (docker, dev servers)
  • Send notifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions