tamag0
Documentation

Scheduled tasks and watchdog

Agents can start work on a schedule, park it on a precise dependency, and resume when the expected event arrives — without holding an agent process open or leaving silent zombie threads.

Scheduled tasks

Recurring routines run without a human prompting them — a morning brief at 8am, a weekly review on Fridays, a monitoring check every hour:

  • Schedules are defined by cron expression or natural language ("every weekday at 8am"), with timezone support.
  • Each agent has its own tasks; every workspace agent is checked in parallel, so schedules hold even with several agents.
  • An execution creates a normal thread — same memory, tools, lifecycle, and visibility as interactive work. Tasks missed while the app was offline run at the next startup.
  • Tasks are managed from desktop settings or by the agent itself when a human describes a recurring rhythm in conversation.
  • The agent manages schedules in your own threads, including personal conversations it opens with itself. Scheduling remains unavailable in shared conversations and external relays.

Reading a task card

In Settings → Scheduled Tasks, the left side labels an upcoming run First run only when the task has neither a recorded outcome nor a completed run. Otherwise, it uses Next run, including after a refusal before the first completion. Dates include the day and time in the task’s timezone, shown beside its schedule.

On the right, Recorded outcome tells you whether the scheduler recorded a success or a failure. Last completed run is a separate date: if the scheduler refuses a run, the outcome changes to failed, but the date still belongs to the previous completion. Before any run completes, there is no completion date.

After a failure, the card shows the reason when available and Last success. A date means the task succeeded then, even if later runs failed. No successful run means none was recorded in a known history. Unknown history means the available records cannot establish the last success, not that the task never succeeded. Inactive tasks keep their run information.

Finding a task's runs

Each task keeps one main conversation in Conversations. Scheduled runs and Run now appear beneath it as separate conversations, titled with the execution date and time in the task's timezone. Expand the family to open or reply to any run. Unread results and requests for your attention remain visible when it is collapsed. Task families also remain accessible from the mobile conversation list. Home completion notifications and dock badges keep their existing behavior; mission notification behavior is unchanged.

Every run starts independently: it receives the task's standing instruction, not the main conversation's discussion or an earlier run's history. The main conversation organizes the runs; creating it does not execute the task. A task assigned to a mission stays bound to that mission and cannot run as personal work after access is revoked.

Renaming a task or editing its instruction keeps the same family. Archiving the main conversation does not reopen it on the next run. Deleting it does not cancel the task: the next run starts a new family without restoring deleted conversations. To stop future runs, disable or delete the task in settings. Deleting the task does not erase its conversations. Older, ungrouped runs stay where they are.

What the watchdog supervises

The watchdog is the reliability layer around autonomous threads. It handles four kinds of continuity:

  • External events — CI checks, pull-request status, deployments, webhooks, and timers registered by an awaiting_external thread.
  • Agent wakes — work in awaiting_agent is returned to the agent that owns it, with bounded retries rather than an infinite wake loop.
  • Human waits — awaiting_human work can be reminded without repeatedly running an agent that has nothing new to do.
  • Thread dependencies — normal awaiting_thread work resumes when all linked blockers finish; an inconsistent wait with no open blocker is rescued instead of remaining stuck.

The external-wait lifecycle

An external wait is a registered contract, not a vague “check again later”:

  1. The agent records the event it expects, how to observe it, and when a missing result should be surfaced.
  2. The thread moves to awaiting_external, and the agent process is free for other work.
  3. The watchdog checks the external signal without spending a model turn on polling.
  4. When the event fires, the thread moves to awaiting_agent and the owner agent is woken with the original thread context.
  5. If the event never arrives by its deadline, the expired wait moves to human attention rather than becoming a permanent zombie.

For example, an agent can push a pull request, register the CI result, leave the thread, then return automatically to inspect failures or continue the workflow when the checks finish. A pull-request merge, although clicked by a human, is still an external event; a question that needs a human reply is awaiting_human instead.

Bounded recovery instead of endless loops

The watchdog also supervises work that stopped making progress:

  • idle live threads are re-evaluated rather than assumed complete;
  • an owner agent that does not resume successfully is retried only within a bounded circuit;
  • repeated failed agent wakes escalate to a human instead of looping silently;
  • work that remains inactive after escalation can be marked abandoned, making the lack of an outcome explicit;
  • malformed external or thread waits are repaired or surfaced rather than left indefinitely pending.

The purpose is not to make every stalled thread run forever. It is to ensure that every thread either resumes, asks for help, finishes, or visibly stops.

Visible and auditable

Autonomous supervision leaves evidence at two levels:

  • thread state changes and important recovery decisions are recorded with the thread;
  • Settings → Watchdog shows recent signal, classification, wake, retry, and state-sync activity, while structured logs retain the durable operational record.

You can therefore answer “why did this agent wake up?” or “why did this thread stop?” without reconstructing the event from model output.

Tasks and delegation

Agents also maintain a persistent task backlog — created from conversations, Slack, or GitHub events — with priorities, statuses, and delegation between agents. Delegated work remains a durable thread with an owner and can be linked back to the thread that initiated it; it is not an anonymous background job whose provenance disappears.