We present an online adaptive clustering algorithm in a decision tree framework which has an adaptive tree and a code formation layer. The code formation layer stores the representative codes of the clusters and the tree adapts the separating hyperplanes between the clusters. The membership of a sample in a cluster is decided by the tree and the tree parameters are guided by stored codes. The model provides a hierarchical representation of the clusters by minimizing a global objective function as opposed to the exisitng hierarchical clusterings where a local objective function at every level is optimized. We show the results on real-life data.