← ClaudeAtlas

autonomous-task-reliabilitylisted

Ensure overnight and autonomous tasks actually execute. Scheduled loop, idle detector, pre-shutdown dispatch, watchdog with auto-fix. Solves the planned-but-not-started gap.
puretechnyc/purebrain-skills · ★ 0 · AI & Automation · score 78
Install: claude install-skill puretechnyc/purebrain-skills
# Autonomous Task Reliability ## The Problem AI sessions end. Overnight work doesn't happen. The agent says "I'll dispatch the team tonight" but the session closes before it actually does. The scratchpad says "planned" but nothing was started. The human wakes up disappointed. This skill solves that with 4 structural mechanisms that make task execution inevitable, not aspirational. ## Component 1: Persistent Scheduled Loop **Purpose:** A persistent process that runs independently of chat sessions. Even if the AI session ends, scheduled tasks keep firing. **Pattern:** Chat session = interactive work. Scheduled loop = automated work. They are decoupled. **Implementation:** ```bash #!/bin/bash # scheduled_loop.sh - runs in a persistent tmux session # Launch: tmux new-session -d -s task-loop './tools/scheduled_loop.sh' CYCLE_SECONDS=1800 # 30 min between cycles STATE_FILE="./data/scheduled-tasks-state.json" LOG_FILE="./logs/scheduled_loop.log" while true; do CURRENT_HOUR=$(date -u +%H) CURRENT_DOW=$(date -u +%u) # 1=Mon, 7=Sun # Check each registered task # Example: daily morning briefing at 13 UTC (8 AM EST) if [[ "$CURRENT_HOUR" == "13" ]]; then if ! task_ran_today "morning-briefing"; then log "Firing morning briefing..." # Inject wake prompt into the AI's tmux session tmux send-keys -t ai-primary "[TASK] Morning briefing due. Execute now." Enter record_task_result "morning-briefing" "inject