Skip to content
cccskills
FreePublished on GitHub

omcustom-loop

Prevent session idle during background agent work via SubagentStop prompt hook auto-continuation

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

/omcustom:loop — Session Auto-Continuation

Overview

Prevents session idle when background subagents complete by using a SubagentStop prompt hook that nudges the orchestrator to check for pending workflow steps.

How It Works

  1. When a background subagent completes, Claude Code fires the SubagentStop event
  2. The prompt hook injects a message asking the orchestrator to check for pending steps
  3. If pending steps exist, the orchestrator proceeds automatically
  4. If no pending steps, it reports results and waits for user input

Safety Limits

  • 3 consecutive auto-continues max: After 3 automatic progressions without user interaction, the system pauses and asks the user before proceeding
  • stuck-detector integration: If the same action repeats 3+ times, stuck-detector intervenes
  • cost-cap-advisor: Cost monitoring continues during auto-continuation

Configuration

The hook is configured in .claude/hooks/hooks.json under SubagentStop. It works alongside the existing task-outcome-recorder.sh command hook.

Limitations

  • Platform constraint: Claude Code's turn-based model means the prompt hook only fires when a subagent completes — it cannot wake the model from true idle state
  • Foreground agents preferred: For guaranteed continuation, use foreground parallel agents (R009) instead of background agents
  • PoC status: This is an experimental feature. If the prompt hook doesn't reliably trigger in all scenarios, fall back to foreground agent patterns

Usage

/omcustom:loop          # Show current auto-continuation status
/omcustom:loop status   # Same as above

The feature is active by default via hooks.json. No explicit activation needed.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Apache Airflow best practices for DAG authoring, testing, and production deployment

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

See all skills by baekenough

Report a problem with this skill