ワンクリックで
stuck
Diagnose a frozen, slow, or stuck agent session by inspecting running processes and recent logs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Diagnose a frozen, slow, or stuck agent session by inspecting running processes and recent logs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Research and plan a large-scale mechanical change, then execute it in parallel across independent work units
Review staged changes and create a conventional git commit
Diagnose agent session issues — show recent logs, tool errors, and configuration problems
Review auto-memory entries and promote useful ones to CLAUDE.md or project memory files
Review changed code for reuse, quality, and efficiency, then fix any issues found
Capture the current session's repeatable process into a reusable SKILL.md file
| name | stuck |
| description | Diagnose a frozen, slow, or stuck agent session by inspecting running processes and recent logs |
| when_to_use | When the agent appears frozen, is consuming excessive CPU or memory, or a tool call seems to have hung with no output. |
| argument-hint | optional: PID or process name to focus on |
| context | inline |
| allowed-tools | ["bash","read_file"] |
| disable-model-invocation | true |
Diagnose the stuck or slow session.
$ARGUMENTS
ps aux | grep -E "(agentd|ai-coding|go run)" | grep -v grep
For each suspicious process, note:
R (running), S (sleeping), D (uninterruptible I/O), T (stopped), Z (zombie)Signs of a stuck session:
| State | Meaning |
|---|---|
| D | Blocked on I/O — possibly waiting on a file, network, or subprocess |
| T | Stopped (Ctrl+Z was pressed, or SIGSTOP sent) |
| Z | Zombie — parent is not reaping the child |
| High CPU (≥90%) sustained | Infinite loop or CPU-bound operation |
| High RSS (≥1 GB) | Memory leak or unbounded accumulation |
For any suspicious PID from Step 1:
pstree -p <PID> 2>/dev/null || ps --ppid <PID> 2>/dev/null || echo "pstree unavailable"
This shows if the agent is waiting on a child process (git, shell command, etc.).
# Look for long-running subprocesses that might be blocking a tool
ps aux --sort=etime | grep -E "(git|bash|sh)" | head -20
ls -t /tmp/ai-coding-*.log 2>/dev/null | head -1 | xargs tail -30 2>/dev/null \
|| ls -t /tmp/agentd-*.log 2>/dev/null | head -1 | xargs tail -30 2>/dev/null \
|| echo "No log file found"
Structure the report as:
Table of all agent-related processes with PID, state, CPU, memory, elapsed time.
kill -CONT <PID> to resume, or kill <PID> to terminate cleanly.kill <PID>.kill <PID>) for a graceful shutdown.kill <child-PID> first, then the parent should unblock.