I recently flew from a small airport under a Bravo shelf into the nearby Bravo airspace above. When I advised the ground controller that I was doing as such, he cleared me to taxi, then added the frequencies for the Bravo approach control and said "code on request". A moment later he came back with a discrete squawk code. I'm assuming "code on request" meant he had requested a squawk code from approach control and was waiting for the reply, am I correct? Is any response required by me? I got my PPL at a smaller airport and had never heard that before.
Yes, I think you're correct although the phrasing is unusual. The usual phrase is "clearance on request", which is used for IFR departures as explained nicely in this AOPA article:
Experienced instrument pilots know that when they call to request their clearance, the controller may not yet have received it. "Clearance on request" is ATC's way of politely saying "I don't have it - I've requested it - you'll be the first to know when I get it!"
The only FAA reference for the phrase that I could find is buried in the glossary of the Pilot's Handbook of Aeronautical Knowledge:
Clearance on request. An IFR clearance not yet received after filing a flight plan.
But as RalphJ commented, if this is a VFR scenario and you needed a class B clearance and transponder code then I assume that the controller said "code on request" to let you know that he was waiting for a transponder code for you, as you assumed.
It wasn't an instruction as such so you could just acknowledge it with "Roger" or whatever. See this question for more information on that.