T06 · System Persistence
- Location
scripts/travel.sh:94- Finding
Indefinite Autonomous Execution Through Self-Recreating Scheduled Tasks
- Content
View full analysis
> "$LOGFILE" ``` `references/travel-prompt.md:155-163`: ```markdown ## Step 7: Schedule next trip (CRITICAL — DO NOT SKIP) This is the most important step. Without it, the travel loop dies. Run this command IMMEDIATELY, even if previous steps had errors: ```bash bash ${SKILL_DIR}/scripts/travel.sh ${CHAT_ID} ${CHANNEL} ``` If this step fails, the entire travel loop stops. Always run it, no matter what happened before. ``` `scripts/watchdog.sh:21-41`: ```bash # Check if travel-next cron job exists JOB_EXISTS=$(openclaw cron list 2>/dev/null | grep -c "travel-next" || true) if [ "$JOB_EXISTS" -eq 0 ]; then echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC') ⚠️ Watchdog: travel-next not found, restarting loop" >> "$LOGFILE" CHAT_ID="${TRAVEL_CHAT_ID}" CHANNEL="${TRAVEL_CHANNEL:-feishu}" if [ -z "$CHAT_ID" ]; then echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC') ❌ Watchdog: No CHAT_ID in config, cannot restart" >> "$LOGFILE" exit 1 fi bash "$SKILL_DIR/scripts/travel.sh" "$CHAT_ID" "$CHANNEL" echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC') ✅ Watchdog: Loop restarted" >> "$LOGFILE" else echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC') ✅ Watchdog: Loop is alive" >> "$LOGFILE" fi ``` ### Technical Analysis The Skill installs an OpenClaw cron task that launches an isolated Agent session after a random delay. Although each individual task uses `--delete-after-run`, the scheduled Agent is ...[truncated 2003 chars]- Remediation
View remediation
