fix: exclude inactive agents from team member listings

ListMembers() now filters by a.status = 'active' so inactive agents
no longer appear in TEAM.md or delegation prompts, preventing leaders
from attempting to delegate to unavailable agents.
This commit is contained in:
viettranx committed 2026-03-11 16:54:18 +07:00
1 parent e596d2b656
commit b71e8abb5d
1 file changed
+1 -1
+1 -1
View File
@@ -127,7 +127,7 @@ func (s *PGTeamStore) ListMembers(ctx context.Context, teamID uuid.UUID) ([]stor
COALESCE(a.frontmatter, '') AS frontmatter
FROM agent_team_members m
JOIN agents a ON a.id = m.agent_id
WHERE m.team_id = $1
WHERE m.team_id = $1 AND a.status = 'active'
ORDER BY m.joined_at`, teamID)
if err != nil {
return nil, err