‹ 首页

detect-zero-iteration-failures

@hkuds · 收录于 5 天前 · 上游提交 1 周前

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

适合你,如果 agent 在首次执行前就异常退出

/ 通过 npx 安装 校验哈希
npx oh-my-skill add hkuds/openspace/detect-zero-iteration-failures
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- hkuds/openspace/detect-zero-iteration-failures
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify hkuds/openspace/detect-zero-iteration-failures
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
6920GitHub stars
~910上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 2c5cc40 · 表述以原文为准
它做什么

装上后,Claude能识别出在开始执行任何步骤前就失败的agent任务,并提示这是系统级问题,需要检查基础设施而不是agent的指令或逻辑。

什么时候触发

当你分析agent任务执行日志时,发现迭代次数为0、没有工具调用、没有产出文件、且对话只有用户指令时触发。

装好后可以这样说
Claude会验证零迭代失败模式。
Claude会建议转向基础设施排查。
Claude会输出严重级别和应调查的团队。
技能原文 SKILL.md作者撰写 · MIT · 2c5cc40

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
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())
Step 2: Check System-Level Indicators

Look for these error patterns in system logs:

  • Environment errors: Missing packages, permission denied, path not found
  • Initialization errors: Connection failures, timeout during setup
  • Resource errors: Memory exceeded, quota limits, rate limiting
  • Parsing errors: Invalid JSON, encoding issues, malformed input
Step 3: Route Investigation Appropriately
IF zero-iteration failure detected:
    └── Do NOT debug agent logic or prompt instructions
    └── DO investigate:
        ├── System initialization logs
        ├── Environment configuration
        ├── Resource allocation and limits
        └── Input parsing and validation
Response Actions
For Analysts
  1. Flag as system-level issue - Do not attribute to agent behavior
  2. Check infrastructure health - Verify system components are operational
  3. Review recent changes - Look for deployments, config updates, or quota changes
  4. Escalate appropriately - Route to infrastructure/platform team, not agent developers
For Automated Systems
def categorize_failure(execution_log):
    """Categorize failure type for routing."""
    if is_zero_iteration_failure(execution_log):
        return {
            'category': 'PRE_EXECUTION_FAILURE',
            'severity': 'HIGH',
            'investigation_team': 'INFRASTRUCTURE',
            'agent_debug_required': False,
            'recommended_actions': [
                'Check system initialization logs',
                'Verify environment configuration',
                'Review resource quotas and limits',
                'Validate input parsing pipeline'
            ]
        }
    else:
        return {
            'category': 'EXECUTION_FAILURE',
            'severity': 'MEDIUM',
            'investigation_team': 'AGENT_DEVELOPMENT',
            'agent_debug_required': True
        }
Example Analysis

Zero-Iteration Failure Example:

Task ID: 69a8ef86-phase1
Iterations: 0
Tools Used: None
Files Created: None
Messages: [User instruction only]
Agent Report: "Failed before executing any iterations"

Analysis: PRE_EXECUTION_FAILURE
- No agent logic was executed
- Failure occurred during initialization
- Action: Investigate system environment, not agent prompts

Normal Execution Failure (for contrast):

Task ID: abc123
Iterations: 3
Tools Used: [read_file, write_file, shell_agent]
Files Created: [output.txt]
Messages: [User instruction, Agent response x3]
Agent Report: "Could not complete task due to X"

Analysis: EXECUTION_FAILURE
- Agent logic was executed
- Failure occurred during task performance
- Action: Debug agent reasoning and tool usage
Key Takeaways
  1. Zero iterations = Pre-execution failure - The agent never got to work
  2. System-level, not agent-level - Debug infrastructure, not prompts
  3. High severity - Indicates potential systemic issues affecting multiple tasks
  4. Distinct failure mode - Treat separately from normal execution failures
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。