stuck-process-detection

Detect stuck background Bash processes and recover via KillShell.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/krwhynot/crispy-crm --skill stuck-process-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stuck-process-detection
Source: https://github.com/krwhynot/crispy-crm/tree/main/.claude/skills/stuck-process-detection
Command: npx skills add https://github.com/krwhynot/crispy-crm --skill stuck-process-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents infinite polling loops and hangs when monitoring background shells, by enforcing timeouts, max polls, and a clear recovery path with KillShell.

Core Features & Use Cases

  • Foreground-first operation with explicit timeout limits.
  • Max poll controls (e.g., 5 attempts) to prevent endless waiting.
  • Stuck-pipeline detection via 3 consecutive empty BashOutput responses triggers recovery.
  • Integration with KillShell for automatic recovery and safe retry decisions.

Quick Start

Use the detector when launching background processes, and configure a max poll limit to automatically stop and recover on timeouts.

Frequently Asked Questions about stuck-process-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect when background processes hang during CI/CD pipelines?

Stuck-process detection monitors background Bash calls with enforced timeouts and max polling attempts. When 3 consecutive empty responses occur or timeout is reached, it triggers recovery via KillShell, preventing infinite loops in test suites, builds, and dev servers.

What's the best way to prevent polling loops from hanging indefinitely?

Configure max poll limits and explicit timeout constraints on background process monitors. The detector enforces these boundaries and automatically recovers stuck pipelines, stopping endless waiting and enabling safe retry logic.

Can I use stuck-process detection with run_in_background configurations?

Yes. The detector integrates with run_in_background setups, applying foreground-first operation with timeout and max polling controls to catch stuck shells and trigger KillShell recovery before hangs cascade.

How does KillShell integration help recover from stuck background processes?

KillShell provides automatic termination and safe recovery steps when stuck-process detection triggers. It cleans up hung processes and enables retry decisions without manual intervention or pipeline deadlock.

What happens when a background process stops returning output during polling?

After 3 consecutive empty BashOutput responses, stuck-process detection flags the pipeline and initiates KillShell recovery. Timeouts and max poll limits ensure detection occurs before monitoring loops consume indefinite resources.

Do I need to configure timeout limits separately or does the detector set defaults?

Configure explicit timeout limits and max poll attempt counts when launching background processes. The detector enforces these constraints you define, stopping and recovering when either boundary is hit.