Q7: an agent runs one session at a time
Claims skip agents that already have a running run, manual runs refuse a busy agent, a run whose task was reassigned fails before executing, and tasks with a run in progress cannot be deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fb4ca9ae6
commit
72eb645067
6 files changed
+129
-14
No files matched your search
@@ -512,6 +512,9 @@ export class OrganizationService {
|
||||
}
|
||||
|
||||
deleteTask(input: DeleteTaskInput): void {
|
||||
const running = this.db.prepare("select 1 from task_runs where task_id = ? and org_id = ? and state = 'running' limit 1")
|
||||
.get(input.taskId, input.orgId);
|
||||
if (running) throw new Error("This task has a run in progress; wait for it to finish before deleting the task.");
|
||||
const result = this.db.prepare("delete from tasks where id = ? and org_id = ?").run(input.taskId, input.orgId);
|
||||
if (result.changes === 0) throw new Error("Task was not found.");
|
||||
this.audit.record({
|
||||
|
||||
Reference in new issue
Block a user