From 7f897fe9f5dedc11f0edf9314da26b0c4f0b57b4 Mon Sep 17 00:00:00 2001 From: viettranx Date: Mon, 30 Mar 2026 08:13:36 +0700 Subject: [PATCH] fix: propagate TenantID in team task dispatch InboundMessage dispatchTaskToAgent() constructed InboundMessage without TenantID, causing DB-level MCP servers to be invisible when dispatching team tasks from the dashboard. Same root cause as #560. --- internal/gateway/methods/teams_tasks_mutations.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/gateway/methods/teams_tasks_mutations.go b/internal/gateway/methods/teams_tasks_mutations.go index 6f180570..c6c13ffd 100644 --- a/internal/gateway/methods/teams_tasks_mutations.go +++ b/internal/gateway/methods/teams_tasks_mutations.go @@ -405,6 +405,7 @@ func (m *TeamsMethods) dispatchTaskToAgent(ctx context.Context, task *store.Team Content: content, UserID: userID, AgentID: ag.AgentKey, + TenantID: store.TenantIDFromContext(ctx), Metadata: meta, }) slog.Info("teams.tasks.dispatch: sent task to agent",