T06 · System Persistence
- Location
scripts/goal_engine.py:37- Finding
Persistent Autonomous Agent Execution Through Enabled Cron Jobs
- Content
View full analysis
", "model": "opencode/deepseek-v4-flash-free", "timeoutSeconds": 300 }, "delivery": {"mode": "none"}, "enabled": True } ``` ```python def cmd_cron(args): data = _load() g = _find(args.goal_id, data) if not g: print(f"No goal with id: {args.goal_id}", file=sys.stderr) sys.exit(1) cron = dict(CRON_TEMPLATE) cron["name"] = f"goal-check-{g['id']}" cron["description"] = f"Goal check-in: {g['statement'][:80]}" cron["payload"]["message"] = _make_checkin_message(g) print(json.dumps(cron, indent=2, default=str)) ``` The installation instructions are: ```markdown Generate and create a cron job for the periodic check-in loop: python3 scripts/goal_engine.py cron "" This prints JSON. Use the output to create an OpenClaw cron job (cron tool → add action). ``` ### Technical Analysis The skill is explicitly designed to create an enabled, recurring OpenClaw agent task. The default interval is one hour, and the scheduled payload starts a new agent turn in an isolated session. The generated job has no expiration time, maximum execution count, or mandatory reauthorization mechanism. The script also does not verify that a goal is active before generating the job. Consequently, a job can be generated for a paused, completed, or abandoned goal. Closing a goal only updates its registry record. It does not identify, ...[truncated 1870 chars]- Remediation
View remediation
