Durable scheduled agent tasks backed by Archie's task queue #926

Closed
opened 2026-10-27 13:38:19 +00:00 by sam · 0 comments
Owner

Add first-class one-shot, interval, and cron scheduling for Telegram agents. The scheduler decides when work is due but never executes an LLM or shell inline: it atomically enqueues a normal durable Archie task under the originating identity, and existing workers execute it with the usual tool, sandbox, lifecycle, and observability policies. Expose typed agent tools and Telegram management surfaces for create/list/status/pause/resume/delete/run-now, with delivery back to the originating chat.

Acceptance Criteria

Schedules support one-shot timestamps, fixed intervals, and cron expressions with explicit timezone. Definitions and execution history survive daemon restarts. Due firing uses an atomic lease/idempotency key so concurrent daemons and crash recovery do not duplicate a scheduled occurrence. Scheduler callbacks only enqueue normal tasks; they never run agents or shell commands inline. Each schedule records owner identity, origin chat/thread, prompt/task payload, enabled capability policy, overlap policy, next run, last result, and delivery state. Authorized users can create/list/status/pause/resume/delete/run-now from chat and equivalent typed agent tools. Missed-run, long-running overlap, clock/DST, cancellation, queue failure, execution failure, and delivery failure semantics are explicit and tested with a fake clock. Cron-spawned tasks cannot recursively create schedules unless explicitly authorized. Library selection is documented and does not replace Archie's durable queue semantics.

Close reason

Closed on GitHub; syncing bead state


Imported from beads archie-core-1786637500222-398-375b8172 · GitHub #419 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-26

Add first-class one-shot, interval, and cron scheduling for Telegram agents. The scheduler decides when work is due but never executes an LLM or shell inline: it atomically enqueues a normal durable Archie task under the originating identity, and existing workers execute it with the usual tool, sandbox, lifecycle, and observability policies. Expose typed agent tools and Telegram management surfaces for create/list/status/pause/resume/delete/run-now, with delivery back to the originating chat. ### Acceptance Criteria Schedules support one-shot timestamps, fixed intervals, and cron expressions with explicit timezone. Definitions and execution history survive daemon restarts. Due firing uses an atomic lease/idempotency key so concurrent daemons and crash recovery do not duplicate a scheduled occurrence. Scheduler callbacks only enqueue normal tasks; they never run agents or shell commands inline. Each schedule records owner identity, origin chat/thread, prompt/task payload, enabled capability policy, overlap policy, next run, last result, and delivery state. Authorized users can create/list/status/pause/resume/delete/run-now from chat and equivalent typed agent tools. Missed-run, long-running overlap, clock/DST, cancellation, queue failure, execution failure, and delivery failure semantics are explicit and tested with a fake clock. Cron-spawned tasks cannot recursively create schedules unless explicitly authorized. Library selection is documented and does not replace Archie's durable queue semantics. ### Close reason Closed on GitHub; syncing bead state --- _Imported from beads `archie-core-1786637500222-398-375b8172` · GitHub #419 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-26_
sam added the mediumfeature labels 2026-10-27 13:38:19 +00:00
sam self-assigned this 2026-10-27 13:38:19 +00:00
sam closed this issue 2026-10-27 13:38:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#926