跳到主要内容

Session Loop

Repeat a prompt on an interval via cron or tick.

Skill metadata​

SourceBundled (installed by default)
Pathskills/devops/session-loop
Version1.0.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos, windows
Tagscursor, loop, cron, monitor, schedule, tick
Related skillskanban-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_notifications in config.yaml

How to Run​

Choose the socket​

NeedUse
Survive restart / hours–daysvibeos cron add
Wake agent only on changecron + Monitor wakeAgent gate
Same chat session, minutesterminal(background=true) tick + notify
Multi-profile durable workkanban, 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​

CursorVibeOS
/loop 5m …vibeos cron add --schedule "every 5m"
Dynamic next delayAgent chooses next cron edit / one-shot ISO time
Stop loopvibeos cron pause / remove
Only on changeMonitor wakeAgent: false until delta

Procedure​

  1. Confirm interval and stop condition (“until CI green”, “3 times”, “until cancelled”).
  2. Prefer cron for anything longer than ~15 minutes or across restarts.
  3. Keep the recurring prompt short; put heavy context in the script stdout.
  4. Tell the user how to pause/remove the job (name + id).
  5. On each wake: report what changed; avoid repeating unchanged noise.

Pitfalls​

  • Do not spawn unbounded while true without 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_task is process-local; not a substitute for cron.
  • Messaging Automations (Slack/git triggers) → webhook/kanban map, not this skill.

Verification​

  • Job appears in vibeos cron list with the expected schedule.
  • One manual vibeos cron run <id> produces the expected prompt/script output.
  • Monitor jobs stay silent on unchanged digests (wakeAgent: false).