As my title suggests, I read this story in a magazine - "Galaxy" or "Worlds of If" in the mid 1960s. The science fiction content was pretty minimal. The tone was Robert Sheckley-esque, but I don't think it was actually by Sheckley. The main character of the story is the number two agent in an organization like Bond's MI6 or U.N.C.L.E. As the number two agent, his job is to clean up the messes made by the number one agent. We learn that the opposition is organized very similarly, and that the protagonist is friends with the number two agent from the other side - they're always working together to deal with the ridiculously destructive (but invariably ineffectual) gun-fights the number ones engage in.
The punchline of the story is that for some reason the James Bond analog accidentally takes himself out of the game, and the protagonist is suddenly the number one. To his delight he learns that his friend on the other side has had an identical stroke of luck. They start blazing away with happy abandon, knowing that they no longer have to clean up after the spectacular (and still ineffectual) battles.