Memory interface
- Schedulertiming, execution, status, results
MemoryRefread at each run;memory_updateby the agent- Memorylong-term facts, Git transactions
| Task type | Behaviour |
|---|---|
| One-time | Timezone-aware run_at, runs once |
| Recurring | Five-field cron, owner signatures, frozen sandbox policies, non-interactive execution |
| Monitoring | Observation prompts on cron; records logs and state, no cross-channel exactly-once notification |
Excluded: the Memory writer inferring tasks, Commitments on Memory pages, the service implicitly changing Memory, cross-store transactions, an external-token permission model, placeholders or forwarding for deleted records, a second executor, project management, dependencies, subtasks.
Lifecycle of a run
- Owner Web UI, an Agent tool or an external API creates the task.
- The runtime signs prompt or command, cwd, permissions, sandbox and MemoryRef.
- The persistent worker checks once and cron schedules every minute.
- Each run begins by loading the memory as it stands now, through
workspace_id + memory_id. - Execution stays in the frozen non-interactive boundary and writes Scheduler logs and state.
Tick exceptions
- An
Exceptionin the@reboottick or an ordinary tick goes to stderr as a warning and full traceback; the daemon continues at the next minute boundary without replay. After an initial failure, later ticks usereboot=False. - Persistent worker: stderr goes to the global worker log. Foreground
scheduler-worker: the terminal. Neither is a task execution log. run_once,KeyboardInterrupt,SystemExitand otherBaseExceptionstay fail-fast.scheduler-workerand its aliascron-worker, with--onceand--list, bypass the stdio redirection meant for Ink TUI startup.
MemoryRef
| Field | Rule | Failure |
|---|---|---|
workspace_id | Stable ID of the current Memory workspace | Implicit cross-workspace reads rejected |
memory_id | Resolves to a unique Topic block at create and update; content reread at each execution | On write: missing, duplicate, cross-workspace or malformed rejected. Before execution: the task fails, with no fallback to an old snapshot. If several refs exceed the limit, all IDs and Topic paths stay, only content is cut and marked. |
| Write capability | The ref grants none. Local-owner prompt tasks may use memory_search, memory_get, memory_update, through existing citation checks, format validation, derived views and Git transactions. | A failed Memory transaction leaves Scheduler state alone |
Agent protocol
| Phase | Agent | Boundary |
|---|---|---|
| Planning | Only for a task worth keeping: memory_update.create_record, then attach the returned memory_id as memory_refs | Sequential, not atomic; either failure is reported. Temporary reminders need no Memory. |
| Execution | Reads the original record, then update_record with status, results or what the next run needs | Other tools follow the conversation's permission mode. Only Memory lifecycle tools are refused to a schedule not set up by the owner. |
| Closure | Mark completed or closed, or delete_record when nothing is worth keeping. An interactive agent may disable or delete the task. | The old ID returns NOT_FOUND; a task still referencing it fails next time, so remove the task first. |
Deleted content stays recoverable from reachable Git history if it was committed, the repository exists and history was not rewritten. memory_get queries only HEAD, so an old ID is not queryable through the API.
Legacy Commitments
| Record | Becomes |
|---|---|
open, dated | Enabled one-time task at 09:00 local on that date |
open, undated | Paused one-time draft keeping text and provenance until the owner sets a time |
| Original file | commitments.jsonl moves to the Scheduler migration archive; repeated startups create no duplicates |
| Memory writer | No record_commitments tool or prompts. The old parser stays only for migration. |
Where the user sees and edits the tasks: Tasks page.
Choices
| Source | Handling |
|---|---|
| Existing cron | Execution safety and cron-compatible entry points stay; named Scheduler, in the persistent worker |
| Commitments, heartbeat | Not a Memory type; migration reads only, no tab, status field or special heartbeat |
| Automatic dual writes | Rejected. Agents compose two existing tools. |
Acceptance
- The three Memory tools execute from a Scheduler prompt worker, deny and ask rules still win, and a scripted run updates a Topic with a Memory Git commit.
- Regressions cover initial and ordinary ticks, waits, oversleep, logging, CLI entry points and both fail-fast boundaries.
Implementation status
Implemented: internal-agent lifecycle, tick isolation. Deferred: the external-token permission model.
Last updated · 2026-11-25