Scheduler
This page covers automated scheduling and how to recover a scheduler skill after a bad edit.
Scheduler skills (isolated namespace)
Scheduler-triggered skills live in a separate tree, not scanned by host.Scanner():
~/.config/agenvoy/skills/scheduler/<short>-<hash8>/SKILL.md
| Aspect | Regular skill | Scheduler skill |
|---|---|---|
| Path | ~/.config/agenvoy/skills/<name>/SKILL.md |
~/.config/agenvoy/skills/scheduler/<short>-<hash8>/SKILL.md |
Frontmatter name |
<name> |
<short>-<hash8> (no scheduler- prefix) |
/<name> autocompletion |
yes | no — surfaced as /sched-<name> (warn-purple) at the bottom of the picker |
| Trigger | MatchSkillCall then run_skill |
(a) cron / one-shot fire from daemon runtime.SetRunner, (b) manual /sched-<name> from TUI |
Creation flow
The scheduler-skill-creator skill is the canonical entry for new schedules. It:
- Pre-flight gate (Step 0): if the user message lacks a time token (
+5m/HH:MM/ etc.) or task token, it must callask_userfirst — no defaulting to+10m, no inferring "probably 9am". - Runs
python3 scripts/init_scheduler_skill.py <short>to create the skill dir with hash suffix. - Patches the SKILL.md body (description + task + output format).
- Calls
add_scheduleto bind the schedule.
Direct add_schedule calls are allowed only for rebinding existing schedules (changing the time of an already-created scheduler skill).
Manual execution (/sched-<name>)
The TUI command picker lists every directory under scheduler/ as /sched-<name>. Selecting one reads the body and dispatches it to the current agent with a preamble that blocks weaker models from misreading the SKILL.md-shaped body as a schedule-creation request and re-running the creator.
The preamble enforces:
- Execute the existing scheduler skill immediately and output results
- Do not activate
scheduler-skill-creator - Do not run
init_scheduler_skill.py - Do not call
add_schedule
Daemon fire
runtime.SetRunner registers runSkill(ctx, sessionID, skillName). When the scheduler fires (cron tick or one-shot deadline), the runner:
- Reads body via
filesystem.ScheduleSkillBody(skillName). - Ensures the session directory exists; writes a default
bot.md. - Runs the body through
exec.ExecWithSubagent— an in-process subagent with always-allow context.
One-shot tasks are removed and the skill dir is trashed after a successful fire.
Recovering from a bad edit
Automatic post-run skill rewriting was removed — a failed run no longer edits the skill behind your back. Skill and tool files are still git-versioned under ~/.config/agenvoy/, and every write_skill / patch_skill / remove_skill auto-commits, so recovery is explicit:
| Step | Tool |
|---|---|
| Inspect the revision history of skill or tool storage | list_revisions |
| Hard-reset that storage to an earlier revision | restore_revision |
Both are scoped to ~/.config/agenvoy and never touch the user's project repository. A removed skill lands in .Trash/ and stays recoverable the same way.