Fix: allow agent status change on unassigned tasks

This commit is contained in:
Abhimanyu Saharan
2026-02-15 05:20:32 +00:00
parent 3c8bf27a3f
commit 14a75d8697
2 changed files with 11 additions and 24 deletions

View File

@@ -2075,15 +2075,7 @@ async def _apply_non_lead_agent_task_rules(
code="task_board_mismatch",
message="Agent can only update tasks for their assigned board.",
)
if (
update.actor.agent
and "status" in update.updates
and (update.task.assigned_agent_id is None)
):
raise _task_update_forbidden_error(
code="task_assignee_required",
message="Agents can only change status on tasks assigned to them.",
)
# Allow agents to claim unassigned tasks by updating status (when permitted by board rules).
if (
update.actor.agent
and update.task.assigned_agent_id is not None