# Detect Zero Iteration Failures

Identify and handle pre-execution agent failures occurring before any iterations or...

- Repository: https://github.com/HKUDS/AgentPilot (7784 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add HKUDS/AgentPilot --skill detect-zero-iteration-failures -g -a claude-code -y`
Codex: `npx skills add HKUDS/AgentPilot --skill detect-zero-iteration-failures -g -a codex -y`
Cursor: `npx skills add HKUDS/AgentPilot --skill detect-zero-iteration-failures -g -a cursor -y`
Gemini CLI: `npx skills add HKUDS/AgentPilot --skill detect-zero-iteration-failures -g -a gemini-cli -y`

## Description

Identify and handle pre-execution agent failures occurring before any iterations or tool usage

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Detect Zero-Iteration Failures

This skill helps identify and properly categorize agent failures that occur before any task execution begins. These failures require system-level investigation rather than agent-level debugging.

## When to Apply

Use this skill when analyzing agent task executions where:

1. **Iteration count is 0** - The agent completed zero iterations
2. **No tool usage** - No tools were invoked during the execution
3. **No artifacts created** - No files, documents, or outputs were produced
4. **Minimal or no conversation log** - Only the user instruction exists, with no agent responses

## Identification Checklist

Check the following indicators to confirm a zero-iteration failure:

```
[ ] Iterations reported: 0
[ ] Tool invocations: None
[ ] Files created: None  
[ ] Conversation turns: 1 (user instruction only)
[ ] Agent self-report: Indicates failure before execution began
```

## Failure Categories

Zero-iteration failures typically indicate one of these pre-execution issues:

| Category | Description | Investigation Focus |
|----------|-------------|---------------------|
| Initialization crash | Agent failed during setup | System logs, environment config |
| Environment issue | Missing dependencies or resources | Infrastructure, permissions |
| Prompt parsing error | Input could not be processed | Prompt format, encoding |
| Resource exhaustion | Quota or limits exceeded | System capacity, rate limits |

## Diagnostic Steps

### Step 1: Verify Zero-Iteration Indicators

```python
def is_zero_iteration_failure(execution_log):
    """Check if execution shows zero-iteration failure pattern."""
    indicators = {
        'iterations': execution_log.get('iterations', 0) == 0,
        'tools_used': len(execution_log.get('tool_calls', [])) == 0,
        'artifacts': len(execution_log.get('files_created', [])) == 0,
        'conversation_length': len(execution_log.get('messages', [])) <= 1
    }
    return all(indicators.values())
```

The rest: https://github.com/HKUDS/AgentPilot/blob/HEAD/openspace/benchmarks/gdpval/skills/detect-zero-iteration-failures/SKILL.md
