I think everyone might be looking at this wrong. The knee-jerk reaction is to find ways to prevent his assassinations. Instead of thinking 'how do I make it harder to keep him from assassinating NPCs,' try thinking 'what is the city going to do when confronted by a rash of assassinations?'
I've never looked at largest city myself, so I don't know about the political structure involved, but I can't imagine a social structure in which a handful of murders with a similar MO (i.e. while victim is sleeping, inside the home/bedroom, using a blunt hammer, etc.) not creating some upset. People will start spending more on various protections (additional guards, spells, traps, etc.), but they'll also start taking proactive measures. If it's a fairly lawful town then the authorities will begin looking into it. If it's an evil town the assassin's guild might get upset about territory encroachment, if it's a chaotic place then bounty hunters hired by fearful potential targets and the families of victims will start showing up.
A few knowledge checks on the NPCs part aught to reveal things like: Assassin had Hide in Plain sight (perhaps even that he had the shadow subtype), Assassin was small sized, Assassin uses a gnome hammer, all the victims had recently had a somewhat hostile conversation with a certain shadow-typed gnome with a hammer before they died. Even if he's not leaving any proof sufficient for a modern American court doesn't mean he's not leaving enough proof to satisfy a corrupt city magistrate. Or a 'preferably dead' bounty hunter. This isn't even considering the various divination methods available. Does he have mind-blank? A decent level wizard aught to be able to get a name and other basic info pretty quick...
See how well the gnome likes his tactics when a higher level Kalashtar (With mindsight) urban ranger with favored enemy (shadow) shows up and begins running him down.
The key here is that you're not putting on your DM hat and saying 'No, you can't do your favorite thing anymore' - and that is what you're doing if suddenly all the guards have mind-sight somehow (let alone house-ruling Coup de Grace out the window). Instead you're putting on your DM hat and saying 'There are consequences to your actions.' Don't be reactive in shutting down behavior you don't like, be proactive.