GitHub Phantom Notifications (and How I Fixed It)
Senior Developer, Designer, Technologist! 🇮🇷
Search for a command to run...
Senior Developer, Designer, Technologist! 🇮🇷
No comments yet. Be the first to comment.
Here are the steps I used to to upgrade MySQL to MariaDB in XAMPP on Windows in about 5 minutes. After completing this process, MariaDB will look and work just like MySQL. You may even notice a performance increase in your website. No need to panic f...
Links Cheat Sheet Production usage Persistence JSON JSON DataType RedisJSON @ GitHub Installing Redis on Windows Memurai: Redis for Windows Installing curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-arch...
# Secrets [Ss]ecret.* *.sql *.env *.env.* !*.env.template !*.env.*.template *.local # Setup samples !/setup # Temps **/[Tt]emp **/[Tt]emps **/.DS_Store **/._.DS_Store vite.config.*.timestamp-* *.log yarn-error.log # Packages node_modules node_modu...
Linux Users In Linux, users are defined in the /etc/passwd file, and their passwords are stored in the /etc/shadow file. [!NOTE] Note At one time, this file stored the hashed passwords of every user on the system. However, this responsibility has be...
TL;DR: Three spammy “free money” issues mentioned my username. GitHub removed the issues, but a phantom notification stuck around: the badge count wouldn’t clear and the notifications list was empty. I contacted GitHub Support, learned why this can happen, and used their suggested workaround to mark everything as read via the API/CLI. The ghost is gone.
One day I opened GitHub and saw a shiny badge on notifications. Cool—until I clicked it and… nothing. No unread items. The badge said I had a notification, the page said I didn’t. Schrödinger’s notification.
The backstory:
There were 3 spam/fraud issues (classic “free money” nonsense) that mentioned my username.
I reported them and GitHub deleted them. ✅
But the notification badge stayed stuck, with no visible item to click and mark as read. ❌
I tried all the usual tricks (open/close the tab, browser cache, check mobile vs. desktop, filters, etc.). No dice.
I opened a ticket with this description:
There were recently 3 spam fraud issues that said like "free money" and stuff that mentioned my username.
I reported them and GitHub deleted them.
But their notification remains in my notifications, but i can't mark them as read; because they don't show, just the number badge.
I want these notifications to be removed completely.Reproduction: [Don’t] create a fraud issue that GitHub deletes and mention an account. The notification remains.
Short, honest, and to the point.
Support was responsive and helpful. The gist:
They’re investigating a bug where a “phantom” notification can persist even after offending content is removed or hidden.
One likely cause: the account that mentioned me was flagged for ToS violations, which hides their content (and apparently the notification item), creating a mismatch between the badge count and the visible list.
Workaround: Mark all notifications as read via GitHub CLI or REST API. This doesn’t delete the underlying notification object, but it toggles its read state and often clears the stuck badge.
(They also noted a separate “1–0 of 1” UI oddity they’re investigating.)
They couldn’t promise a timeline for a full fix (fair enough), but they gave two practical commands.
gh api \
--method PUT \
-H "Accept: application/vnd.github+json" \
/notifications \
-F read=true
Requirements:
gh CLI installed and authenticated (gh auth login).curl -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $TOKEN" \
https://api.github.com/notifications
Requirements:
notifications scope. Replace $TOKEN with your PAT.I used the CLI route. Ran it once, refreshed GitHub… phantom badge gone. 🎉
When GitHub hides or deletes content from an account flagged for violations, parts of the system correctly hide the content to protect privacy and prevent further spread.
But the notification counter can get out of sync if the underlying item is hidden/removed in a way that the UI can’t render.
Marking everything as read via the API resets that state, so the badge and list agree again.
Try the CLI command first. It’s simple and safe (it just marks read).
If you prefer cURL, create a PAT with notifications scope and use the API call.
If the badge is still stuck, contact GitHub Support and reference that there’s a known phantom notification issue under investigation. Include any details (repo links, approximate timestamps, screenshots).
Spam happens. The reporting tools work quickly.
The UI can lag behind moderation actions. When in doubt, use the API to nudge state back into place.
Keep a PAT around with minimal scopes you need (or use gh)—it’s surprisingly handy for situations like this.
Huge thanks to GitHub Support for confirming the behavior, explaining the likely cause, and sharing a safe workaround while they investigate a broader fix.
If you’ve run into a similar phantom notification and this helped, ping me—I’m curious how widespread it is and which workaround worked for you.