clear_task_instance
Clear a failed Airflow task instance to retry it without restarting the entire DAG, useful for transient errors like network timeouts.
Instructions
Clear a task instance to retry it without re-triggering the entire DAG.
Use this when a task failed due to a transient issue (e.g. network timeout, temporary S3 error) and you want to retry just that task and optionally all tasks downstream of it.
Args: dag_id: The DAG identifier. dag_run_id: The run ID. task_id: The task to clear/retry. env: Target environment — 'dev', 'uat', 'test', or 'prod'. IMPORTANT: Do NOT guess or default. Ask the user which environment if not specified. include_downstream: If True, also clear all downstream tasks (default: False).
Returns confirmation with the list of cleared task instances.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | ||
| dag_run_id | Yes | ||
| task_id | Yes | ||
| env | No | ||
| include_downstream | No |