γ-ray bursts (GRBs) are transient cataclysmic events, whose role became central in the new multi-messenger era. In the present work I propose a novel investigation of the GRB emission mechanism, via time-resolved spectral analysis of the X-ray tails of bright GRB pulses observed with the XRT instrument onboard the Neil Gehrels Swift Observatory, discovering a unique relation between the spectral index and the flux. The investigation of the spectral evolution during the GRB tail is an ideal diagnostic to understand the connection between the emission processes, the cooling processes and the outflow environment. I thoroughly discuss possible interpretations in relation to current available models and I show the incompatibility of our results with the standard high latitude emission scenario. Our results for the first time strongly suggest evidence of adiabatic cooling of the emitting particles, shedding light on fundamental physics of relativistic outflows in GRBs. Finally I discuss the crucial role of future wide-field X-ray telescopes, such as the mission concept Theseus, for the characterisation of the GRB tail emission, highlighting also its importance in the multi-messenger context.