If you have ever looked at your iCloud settings and seen thousands of messages taking up almost no space, or if your "Sync Now" button does absolutely nothing, you are dealing with one of Apple’s most persistent cloud glitches.
After 32 days of testing, resetting, and even dealing with a countdown timer that went into negative numbers, I have mapped out exactly how to escape this loop. Here is the step-by-step guide to fixing iMessage in iCloud.
The nightmare usually starts when you notice a massive discrepancy in your settings.

In my case, iCloud claimed there were 3,580 messages stored, but the total storage used was only 3.93 MB. This is what we call "Ghost Data." The cloud thinks there is a history to sync, but the actual content is missing or corrupted. This causes the "Syncing with iCloud" status to hang indefinitely because the system is trying to find files that don't exist.
The standard fix is to go to Settings > [Your Name] > iCloud > Show All > Messages and select "Disable and Delete." This starts a 30-day clock where Apple is supposed to purge your message data from the servers so you can start fresh.
However, the software is often bugged. During my wait, I encountered a bizarre glitch:

My phone reported that messages would be deleted in "-12 days." Even after the 30-day window passed, the "Undo Delete" button stayed there. If you see this, it means your device's local cache is out of sync with what is actually happening on Apple's servers.
A major breakthrough in my troubleshooting was identifying the Mac as the "poison" in the sync chain.
When you enable iMessage on a Mac, it doesn't just download from the cloud; it tries to merge its massive local library (stored in ~/Library/Messages) with the cloud. If your Mac has a corrupted database, it will re-upload "ghost" counts to your iPhone and iPad. This is why you might see 200 messages on your phone, but the moment you turn on your Mac, that number jumps to 2,000+ and the sync pauses.
If you are tired of waiting and the numbers still aren't right, the only guaranteed fix is a fresh start. Here is the order of operations I recommend:
Only once the mobile devices are perfect should you sign back into the Mac.
There is a light at the end of the tunnel. As seen in community discussions on Reddit, some users find that if they simply re-enable everything and leave the devices on chargers / Wi-Fi for 48 hours, the "Ghost" numbers eventually disappear on their own as the server performs a background reconciliation.

If your deletion timer is in the negative days or your Mac is causing ghost messages to reappear:
Have you dealt with the -X days bug? Let me know in the comments how you finally got your messages to sync! If you found this article helpful please look through our other articles.
Other links / reference:
https://discussions.apple.com/thread/256198972?sortBy=rank
Deleting all messages in iCloud permanently in 30 days?
byu/6thDAY inapplehelp
https://discussions.apple.com/thread/256252456?sortBy=rank
Help! Running out of storage: why is there such a discrepancy between my iMessage gigs on my phone storage vs iCloud?
byu/stinamb iniCloud
iMessages in the cloud using an EGREGIOUS amount of storage
byu/Feeling_String7372 inios
https://setapp.com/how-to/imessage-not-working-on-mac
Messages taking up 57GB of local storage with iCloud enabled
byu/WayyyCleverer inMacOS
https://forums.macrumors.com/threads/messages-in-icloud-shows-millions-of-messages-in-the-cloud.2415838/