Sir Keir Starmer’s lead security aide has been lobbying for Hamas to keep some of its guns as part of the Gaza peace process.