| name | Handle Failure |
| description | Decide the next action when a worker task fails verification or execution: retry the same worker, reassign to another worker, or escalate to the Orchestrator. |
| version | 1.0.0 |
| category | management |
| skillType | claude-skill |
| assignableRoles | ["team-leader"] |
| triggers | ["handle failure","task failed","worker error","decide next action"] |
| tags | ["failure","recovery","retry","escalation","management"] |
| execution | {"type":"script","script":{"file":"execute.sh","interpreter":"bash","timeoutMs":30000}} |
Handle Failure
Decides the next action when a worker task fails verification or execution. Implements a three-tier decision logic: retry, reassign, or escalate.
When to Use
- When
verify-output returns passed: false
- When a worker reports a
blocked status
- When a worker session crashes or becomes unresponsive
Usage
bash {{SKILLS_PATH}}/team-leader/handle-failure/execute.sh '{"workerId":"worker-1","workerSession":"worker-session","teamId":"team-123","failureInfo":{"error":"3 tests failed","failedSteps":["tests"],"retries":0,"failureType":"verification"},"requiredRole":"developer"}'
Parameters
| Parameter | Required | Description |
|---|
workerId | Yes | ID of the failed worker |
workerSession | No | Session name of the failed worker |
teamId | No | Team ID (needed for reassignment lookup) |
requiredRole | No | Role required for the task (helps find alternatives) |
taskDescription | No | Brief task description for context |
failureInfo | Yes | Failure details object (see below) |
failureInfo Object
| Field | Description |
|---|
error | Error message or description |
failedSteps | Array of failed verification step names |
retries | Number of retries already attempted |
failureType | Category of failure (see below) |
Failure Types
| Type | Description | Default Action |
|---|
|