schedule-poll-orchestrator-patternlisted
Install: claude install-skill wan-huiyan/overnight-workflows
# Schedule-Poll Orchestrator Pattern
## Problem
Multi-track autonomous workflows (overnight ah-ha runs, parallel research,
long-running experiments) need an orchestrator that:
1. Dispatches N parallel tracks that each run 3–8h.
2. Runs consolidation/merge ONCE all tracks complete.
3. Doesn't keep a human-driven session alive for the full 12–20h.
Naive pattern: dispatch tracks at `t+0`, dispatch orchestrator at fixed
`t+Nh` (say, t+10h) where N is a conservative upper bound on track wallclock.
Failure modes of the fixed-timer pattern:
- **Idle waste when tracks finish early.** If tracks finish at t+5h but
orchestrator is scheduled at t+10h, consolidation sits idle for 5h.
- **Hard failure when tracks run long.** If a track takes 11h, orchestrator
fires at t+10h, sees incomplete state, has to bail out. User wakes up to
no consolidation + tracks still running + no retry scheduled.
- **No visibility between.** User has no signal of how tracks are progressing
between dispatch and fixed-timer wake-up.
## Context / Trigger Conditions
This skill applies when ALL of these are true:
- You have 2+ parallel tracks/subagents that run 3–12h each.
- Track completion time has high variance (50%+ spread between fastest and
slowest possible finish).
- You're dispatching via Claude Code's `schedule` skill or equivalent
(RemoteTrigger / CronCreate), NOT via in-session foreground Agent calls.
- The orchestrator work (consolidation, HTML rendering, PR open) must run
AFTER al