Session Loop
Repeat a prompt on an interval via cron or tick.
Skill metadata
| Source | Bundled (installed by default) |
| Path | skills/devops/session-loop |
| Version | 1.0.0 |
| Author | VibeOS |
| License | MIT |
| Platforms | linux, macos, windows |
| Tags | cursor, loop, cron, monitor, schedule, tick |
| Related skills | kanban-automations, vibeos-ops-health, cursor-capabilities-bridge |
Reference: full SKILL.md
The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
Session Loop
Cursor /loop 5m <prompt> means “run this again on an interval.” VibeOS maps
that onto cron (durable) or a short background tick (session-local).
Do not build a second scheduler.
When to Use
- User wants periodic re-check (“every 5m”,
/loop, watch until green) - Poll CI, health, or a file until a condition holds
- Cheap watch that should only wake an agent on change (Monitor mode)
Skip when: one-shot task; work needs a kanban board (use kanban); user wants Slack/GitHub Automations UI (use cron + webhook map instead).
Prerequisites
- Cron available:
vibeos cron(gateway or local scheduler as configured) - For delta-gated watches:
docs/ops/cron-monitor-mode.md+cron/scripts/monitor_delta_gate.py - Background terminal notifications respect
display.background_process_notificationsin config.yaml
How to Run
Choose the socket
| Need | Use |
|---|---|
| Survive restart / hours–days | vibeos cron add |
| Wake agent only on change | cron + Monitor wakeAgent gate |
| Same chat session, minutes | terminal(background=true) tick + notify |
| Multi-profile durable work | kanban, not a loop |
Durable loop (preferred)
vibeos cron add \
--name "loop-health" \
--schedule "every 5m" \
--script 'curl -fsS http://127.0.0.1:8000/health' \
--prompt 'If health failed, diagnose briefly and suggest a fix. If OK, say OK.'
Delta-gated (no tokens when unchanged):
vibeos cron add \
--name "loop-feed" \
--schedule "every 15m" \
--script 'python cron/scripts/monitor_delta_gate.py \
--state "$VIBEOS_HOME/cron/monitor-feeds/example.state" \
--label example \
--cmd "curl -fsS https://example.com/status.json"' \
--prompt 'Summarize the delta. Notify only if the user should act.'
Session-local tick (minutes only)
Use terminal with background=true and notify_on_complete=true (or a
small sleep loop that prints a sentinel). Prefer cron if the user might close
the session.
Parse intervals like Cursor: 30s, 5m, 2h, 1d. Trailing “every 5m” in
natural language means the same schedule.
Quick Reference
| Cursor | VibeOS |
|---|---|
/loop 5m … | vibeos cron add --schedule "every 5m" |
| Dynamic next delay | Agent chooses next cron edit / one-shot ISO time |
| Stop loop | vibeos cron pause / remove |
| Only on change | Monitor wakeAgent: false until delta |
Procedure
- Confirm interval and stop condition (“until CI green”, “3 times”, “until cancelled”).
- Prefer cron for anything longer than ~15 minutes or across restarts.
- Keep the recurring prompt short; put heavy context in the script stdout.
- Tell the user how to pause/remove the job (name + id).
- On each wake: report what changed; avoid repeating unchanged noise.
Pitfalls
- Do not spawn unbounded
while truewithout a documented kill path. - Do not burn tokens every tick when a hash gate would suffice.
- Cron sessions often use
skip_memory=True— do not rely on chat memory. - Background
delegate_taskis process-local; not a substitute for cron. - Messaging Automations (Slack/git triggers) → webhook/kanban map, not this skill.
Verification
- Job appears in
vibeos cron listwith the expected schedule. - One manual
vibeos cron run <id>produces the expected prompt/script output. - Monitor jobs stay silent on unchanged digests (
wakeAgent: false).