I had a problem similar to this with a Briggs & Stratton 15.5HP on a Husqvarna CTH160. When the throttle was set to idle, the revs would be up and down and would not idle smooth and then eventually she would stop. It turned out to be a small amount of rusty colored water in the float bowl of the carburettor, so after a good clean with brake cleaner and an air line, she now runs smooth as a nut.