diff --git a/internal/gateway/methods/agents_update.go b/internal/gateway/methods/agents_update.go index 7148a6ee..12f3d1e1 100644 --- a/internal/gateway/methods/agents_update.go +++ b/internal/gateway/methods/agents_update.go @@ -237,10 +237,11 @@ func (m *AgentsMethods) handleUpdate(ctx context.Context, client *gateway.Client } } + // Post-Phase-2 canonicalization: router cache entries are always keyed + // as `tenantID:agent_key`. The previous belt-and-suspenders UUID-based + // invalidation was dead code — exact-segment match never matches a + // UUID as the final segment of a canonical cache key. m.agents.InvalidateAgent(params.AgentID) - // Also invalidate by UUID — heartbeat/cron sessions cached under UUID key - // before the agentKey fix may still be in the router cache. - m.agents.InvalidateAgent(ag.ID.String()) } client.SendResponse(protocol.NewOKResponse(req.ID, map[string]any{