This is one of those details fans remember differently, and the honest answer is that the moment is easy to misremember. Cosmo and Tails share a close bond throughout Sonic X, and their relationship is a recurring emotional thread in the series.
If you're trying to pin down the exact episode, your best bet is to rewatch the later arcs of Sonic X where the two characters' connection is most emphasized, rather than relying on a fuzzy memory of a single scene.