Suppose there are two users that have commented on an answer. Both have the same user name, and I want to reply to one of them. How can I do this?

It appears that, under the current system, there is no way for me to do this. Specifically, from How do comment @replies work?, I see that:

4. Matching is performed in reverse chronological order, so if five people named John are participating, @john will match the most recent John

So, consider this a request to add this feature using an -n suffix or something similar; e.g. @john-2 could be used to reply to the second John from the top.

Thanks to @Lix for nice answer of @name(userid) based auto-complete suggestion which has no loophole. It involves no counting from top & has no consequences when a comment is deleted. But, I think @name(userid) should be used directly in comment as all form inputs at SE are text (nothing embedded).

Now, I'm trying to finalize it based on it:
The system should allow optional @name(userid) format for reply. Provided userid with this format, system should ignore name. And, in the situation of duplicate name based confusion, system should demand this format as mandatory to submit comment.

How to get userid?
In case of duplicate name based confusion, system should append (userid) in hypertext to their profile. It'd work for mobile version too.
On full version, for easy fill-up, a hover reply icon would be fine (like hover vote up icon). Upon clicking it, system should fill @name(userid) in comment text box.

From reply reader side:
Multiple Johns could be confused even if they didn't come from notification (because nobody remembers his/her own userid). So, highlight the background of comments which are replied to them.

  • 2
    @Arjan Then, I can safely add feature-request tag..
    – user178465
    Mar 17, 2012 at 15:28
  • 7
    How often does this really happen that people with exactly the same name are participating in the same comment thread? There are lots of variations on John, with and without the H for example, and most of the John's have a last name or at least an initial in their user name. Mar 18, 2012 at 7:53
  • To make @Cody's comment a bit more explicit: did anyone ever see this happen? (Given the upvotes it seems people like a solution?)
    – Arjan
    Mar 18, 2012 at 22:08
  • @Arjan at least, its easy-to-happen possibility and nobody wants to be stuck in those situations.
    – user178465
    Mar 18, 2012 at 22:16
  • 5
    @Arjan It seems to have happened on at most 148 posts on Stack Overflow, where one of the users wasn't also the post owner (in which case it doesn't actually matter). In a number of cases (particularly the ones on earlier posts), it seems the two users with the same name are actually the same individual, who inadvertently ended up with two accounts. As such, there doesn't seem to be a particularly pressing need...
    – Tim Stone
    Mar 19, 2012 at 0:26
  • 1
    Just tell one John to pass the message on to the other :p
    – Laurel
    Jun 20, 2022 at 17:10

2 Answers 2


Perhaps a mixed solution will suffice in these cases.

My suggestion would be to append the users unique id to the username when auto-completing the @replies - perhaps within brackets. The resulting @reply would appear as the username - but the notification would be sent to the correct user.

enter image description here

To compliment this feature we could also have the user_id appear when hovering over the text of the user name. One would use the text instead of the avatar because of the Established User permission and it's super cool expanded usercard. This would also draw attention to the fact that the 3 Johns suggested in the auto-complete are in fact separate users.

I can't imagine that this issue comes up on a day-to-day basis (correct me if i'm wrong) - but I believe that this specific issue could be handled this way.

It would be interesting to see how many "duplicate" usernames there are.
I have never (yet) come across an instance where I needed to address a specific user that happened to have the same username as a different user (and both of them have been active on a certain post). However I can imagine the issues that this would create. I wonder how many active John's there are in the tag ;)

Of course all of this would only take place in the event that it was needed - where duplicate names were found. A great suggestion

  • 6
    "I do not have access to the data" Oh yes, you do :) Mar 18, 2012 at 13:55
  • 6
    Great.. A tweak from me to this: Involve userid only when duplicate names found.
    – user178465
    Mar 18, 2012 at 14:20
  • 3
    @Sach - NOW you're talking! No need to confuse people with this on every @reply. It would only appear if the need arises. Good call!
    – Lix
    Mar 18, 2012 at 14:21
  • Here's one instance. Once two users with the same name become active on the same community, it will become more common.
    – Lawrence
    May 21, 2016 at 23:08
  • @Lawrence Broken link
    – Vencovsky
    May 22, 2019 at 15:34
  • @Vencovsky The post was ‘deleted’, so it is only visible to 10k+ rep users and admins etc. It also looks like the other Lawrence deleted his comments; it’s no longer a good example.
    – Lawrence
    May 23, 2019 at 0:38

I support this request, but I'd like to suggest a minor modification:

If the the first comments where form John, John Doe, john and john, it might be difficult to figure out which John @john-2 will notify.

I'd prefer the unambiguous @userid.

  • 7
    Yeah, userid is likely a safer way to go. Using an "X from top" could be tricky to keep track of if two (or more!) users with the same name post multiple comments. (Plus there would be deleted comments to account for to make sure they didn't interfere with the counting.)
    – Adam Lear StaffMod
    Mar 18, 2012 at 2:27
  • @155160 that's indeed a good idea in my opinion. Mar 18, 2012 at 8:51
  • 1
    (If and when it will be implemented, @AnnaLear would be notified of the above comment) Mar 18, 2012 at 8:52
  • 5
    Let's all just revert to the names the system generates for us based on our IDs. Mar 18, 2012 at 12:27
  • @user137537 - Well that's no fun at all is it? :( I do however recognize that issues could arise from users using the same username...
    – Lix
    Mar 18, 2012 at 13:49
  • This would technically solve the issue but would create another one - what about users with similar id's? user137537, user137357, user137337.
    – Lix
    Mar 18, 2012 at 14:49
  • @user137537 (Bolt, is this you?) I remember reading sometime that @ won't work if user has no custom display name. Is my memory failing me? Mar 18, 2012 at 23:06
  • 1
    @userid is completely user-hostile. Sure, it might sound good to a bunch of programmers, but it's totally and fundamentally broken. Two immediate problems: 1) how in the world are we supposed to [easily] determine the user ID of the person we want to respond to in a comment thread? 2) how in the world are other people supposed to [easily] determine the actual user to whom a comment is directed when @userid is used to denote them? For example, no one here knew that @155160 was Anna Lear. Mar 19, 2012 at 1:40
  • @CodyGray: Hovering over the user's name shows its userid in the status bar. You are http://meta.stackoverflow.com/users/153008/cody-gray. I don't see the problem.
    – Dennis
    Mar 19, 2012 at 2:01
  • Being forced to hover over something in order to read cryptic numbers from a URL displayed in the status bar is user-hostile. I didn't say it wasn't possible, I said it wasn't easy or intuitive. Mar 19, 2012 at 6:02
  • 3
    Seriously, I can't even tell if this is tongue-in-cheek or not.
    – Pops
    Mar 20, 2012 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .