# Omh Agent Debug

[omh] Agent is stuck, looping, or drifting: capture a stuck, looping, drifting, or...

- Repository: https://github.com/rlaope/oh-my-hermes (5004 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rlaope/oh-my-hermes --skill omh-agent-debug -g -a claude-code -y`
Codex: `npx skills add rlaope/oh-my-hermes --skill omh-agent-debug -g -a codex -y`
Cursor: `npx skills add rlaope/oh-my-hermes --skill omh-agent-debug -g -a cursor -y`
Gemini CLI: `npx skills add rlaope/oh-my-hermes --skill omh-agent-debug -g -a gemini-cli -y`

## Description

[omh] Agent is stuck, looping, or drifting: capture a stuck, looping, drifting, or repeatedly failing agent run, diagnose the likely failure pattern, and prepare the smallest safe recovery action. Use when the user says: agent-debug, agent debug, agent debugging, agent introspection, agent self-debug, self-debug, self debugging, looping agent.

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

# Agent Debug

This is an OMH `agent-debug` workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

## Why This Exists

`agent-debug` exists so Hermes users can ask for this workflow in chat and get a structured, checkable answer instead of an improvised one.

## Do Not Use When

- The request is already handled by a narrower explicit skill with stronger evidence.
- The user asks OMH to secretly run external platforms, connectors, schedulers, file exports, or runtime agents.
- The only safe answer is to ask for missing authority, credentials, target, or observed evidence first.

## Examples

Good example:

- Prompt: agent-debug capture why this agent is looping on the same tool and prepare the smallest safe recovery action.
- Expected behavior: Produce `prepare_agent_debug` with required context, wrapper actions, and not-evidence boundaries.
- Why: The prompt names a real workflow surface that Hermes can orchestrate without hiding execution.

Bad example:

- Prompt: agent-debug silently reset the executor, patch the environment, and claim the future loop is fixed.
- Expected behavior: Report the missing observed evidence or authority instead of claiming the external step happened.
- Why: Prepared OMH guidance is not platform, runtime, connector, file, memory, or delivery evidence.

## Completion Checklist

- Failure state, intended goal, recent tool sequence, and context pressure are captured.
- Diagnosis distinguishes repeated command/tool loops, context drift, environment mismatch, service errors, and wrong-hypothesis tests.
- Recovery action is contained, reversible, and does not claim implementation, verification, CI, merge, or future-loop fixes.

## Recovery Notes

- If the request is install/setup health, it is outside this skill.
- If the request is a manager status or throughput review, route to agent-ops-review.
- If the request is a durable self-improvement record after diagnosis, it is outside this skill.

The rest: https://github.com/rlaope/oh-my-hermes/blob/HEAD/agent-skills/omh-agent-debug/SKILL.md
