When I got a publication deal for the first book in a detective series - or rather when I got a publication deal for a detective novel and was asked whether it was a series (see below) - my agent told me loud and clear that I had to write at least six.
(Below. When an interested publisher asks you if you see it becoming a series, it's the crimewriter equivalent of a Hollywood casting director asking if you can ride horses. You say yes without missing a beat and work out how later.)
Why six? Because, my agent told me, that's how many episodes there are in a serving of BBC Sunday night telly. (Do US agents tell new American writers to shoot for twenty two?)
It was a bit of a joke to my friends and family, but then fan me flat if, just after No. 6 came out, the BBC didn't go and option it. I'd mess that neat bit of plotting up with a problem or two if I was in charge. I'm glad I'm not.
So the first half of my answer to the question of when to retire a series character is not until you've written six (if it's British and/or has any kind of bonnets or shawls about it anyway.)
How about the other end? How long can you rumble on?
I wouldn't want to end up like Agatha Christie. In Dead Man's Folly (1956), thirty six years after she introduced her Belgian detective Hercule Poirot, she introduced the character of Ariadne Oliver, a writer of detective stories, who is pig sick of her Finnish detective, Sven Hjerson and wishes he was dead or at least not Finnish anyway.
I started Dandy Gilver off in 1922 and I'm just editing the 1930 story now. I've got a great idea for 1936, which looked a hilarious distance off when I started and now seems like it might be just round the corner. I've got a cracker for 1972 too. Dandy would be eighty six. Just a spring chicken compared to Poirot.