Skip to content

The open-source app everyone uses to manage agents at work

Allow Run Now on paused routines

dottac7d05096ab25
diff --git a/server/src/services/routines.ts b/server/src/services/routines.ts
index b4730c0b50..4122152224 100644
--- a/server/src/services/routines.ts
+++ b/server/src/services/routines.ts
@@ -885,7 +885,7 @@ export function routineService(db: Db) {
runRoutine: async (id: string, input: RunRoutine) => {
const routine = await getRoutineById(id);
if (!routine) throw notFound("Routine not found");
- if (routine.status !== "active") throw conflict("Routine is not active");
+ if (routine.status === "archived") throw conflict("Routine is archived");
const trigger = input.triggerId ? await getTriggerById(input.triggerId) : null;
if (trigger && trigger.routineId !== routine.id) throw forbidden("Trigger does not belong to routine");
if (trigger && !trigger.enabled) throw conflict("Routine trigger is not active");