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
bug: Duplicate agent check relies on Docker state, not database #108
The agent creation endpoint checks for duplicate names by querying Docker containers (get_agent_by_name() → docker_client.containers.get()). If the container doesn't exist or was removed, the check passes and a duplicate agent is created with HTTP 200.
Root Cause
File: src/backend/services/agent_service/crud.py line 87-88
get_agent_by_name() calls docker_client.containers.get(f"agent-{name}") which only finds running/stopped containers. If a container was removed but the DB record exists, the check passes.
Expected Behavior
Creating an agent with an existing name should return 409 Conflict (or 400). The check should also query the agent_ownership database table.
Activity
fix: Agent name extraction, duplicate check, schedule clear, Nevermin…