If I'm reading the UTFGrid spec right, you can only have 65,501 different interactive features. Or more precisely, every feature needs a unique ID in the range 0-65501.
TileMill uses UTFGrid for its interactivity, so this limit seems to apply. It shows up as non-parseable JSON being generated, JSON handling exceptions etc.
So, what ID can you use for OpenStreetMap features (loaded into a PostGIS database), given that the osm_id
column will have values in the hundreds of millions.