You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PUT /api/agents/{name}/capacity returns 500 for any value above 10, even when the fleet ceiling allows it #4564
With the fleet ceiling raised to 32 (PUT /api/settings/max-parallel-tasks-ceiling), setting an agent's capacity to
anything from 11 to 32 fails:
PUT /api/agents/my-agent/capacity {"max_parallel_tasks": 16}
500 {"detail": "Failed to update capacity"}
Values 1-10 work.
Why
#506 moved the router's check to the admin-set ceiling (routers/agent_config.py, "validate against the
admin-configured fleet ceiling, not a hardcoded 10"), but the database layer still has the old hardcoded bound:
The router passes 16, the db layer returns False, and the router turns that into a 500.
Expected
Any value from 1 to the fleet ceiling is stored, as the endpoint's docstring and the #506 change describe.
Suggested fix
Drop the upper bound in set_max_parallel_tasks (the router already validates against the ceiling), or check against get_max_parallel_tasks_ceiling() there too. A regression test: ceiling 32, PUT 16, expect 200 and effective_max_parallel_tasks == 16.
Workaround we use
Writing agent_ownership.max_parallel_tasks directly; the runtime then honours min(stored, ceiling) as documented.
Activity
fix(capacity): drop hardcoded cap of 10 in set_max_parallel_tasks (#4567