There is no InteractiveShell instance in the notebook process, and there shouldn't ever be. Nor should the builtin trap have any effect for anything involved in the notebook server, since all it does is provide links to the Shell object, which shouldn't exist.