Перейти к основному содержимому

Перевод: оболочка страницы на русском; тело навыка (SKILL.md) пока на английском — это исходные инструкции агента.

Session Loop

Repeat a prompt on an interval via cron or tick.

Метаданные навыка​

ИсточникВстроенный (установлен по умолчанию)
Путьskills/devops/session-loop
Версия1.0.0
АвторVibeOS
ЛицензияMIT
Платформыlinux, macos, windows
Тегиcursor, loop, cron, monitor, schedule, tick
Связанные навыкиkanban-automations, vibeos-ops-health, cursor-capabilities-bridge

Справка: полный SKILL.md​

к сведению

Ниже полное определение навыка, которое VibeOS загружает при активации. Это инструкции, которые видит агент.

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).