Skip to content

Add a durable, non-blocking automation run lifecycle #9

Description

@celeroncoder

Problem

Alluka automations have schedule and aggregate last-run fields, but a manual Run now request remains open until the entire model run completes. There is no first-class automation-run record with a durable start, progress, terminal reason, cancellation state, or retry history.

This makes long automation runs fragile from the caller's perspective and limits observability when multiple scheduled jobs are due. A user cannot reliably inspect an individual run independently of the automation's latest aggregate status.

Feature

Add durable automation-run records and a non-blocking execution lifecycle.

Each scheduled or manually started execution has its own identity, input snapshot, created/started/finished timestamps, session link, run state, terminal reason, and observable task events. The automation definition retains its summary of recent runs without replacing the per-run history.

Expected behavior

  • Starting an automation returns a run identity promptly rather than holding the caller until generation ends.
  • Runs have clear queued, running, completed, failed, cancelled, and interrupted states.
  • Scheduled and manually triggered runs share the same lifecycle and observability.
  • Users can inspect the relevant session, task timeline, and sanitized failure reason for an individual run.
  • A server restart marks unfinished work accurately rather than presenting it as actively running.
  • Concurrent due jobs and repeated manual starts have defined, visible behavior per automation.
  • Automation configuration and run history retain no provider/MCP credentials in user-visible output.

Why this matters

Automations are a core durable-agent feature. A separate run lifecycle makes them reliable operational work rather than synchronous chat requests triggered by a schedule.

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions