Hmm, I thought it was the question. Re-reading it, I still think it
looks like that's the question. But let me tackle these specific issues you mention.
The question is do you just stop at the total you have or are you limited in some way?
You stop at the point where you have at least enough to level.
For instance a first level thief out with a group of higher level characters could easily earn enough say 3000xp in a session. He can't earn any more till he trains but does he get to keep all of that and just train for second and third level.
If you want a highly technically accurate answer, he stops earning XP as soon as he earns XP which is enough to level him up. This implies the DM should be keeping track of XP-awarding events to some degree. If the thief is at 1150 points and steals 150 gp worth of items then he hits 1300 and stops gaining XP until he takes the time to train. But if the DM doesn't award XP until the end of a session or the end of an adventure (I think AD&D leaves this up to the DM), then the thief might earn significantly more, possibly enough to level him up multiple times. This assumes a massive XP dump though, and I don't think the rules were quite intended to handle this kind of situation.
Or does he lose some XP because he gained more then he needed for second level?
It depends on how the DM awards XP. If the DM sees XP awards as being only granted once an entire adventure is completed, then technically, no, he doesn't miss out on any XP. In your theoretical example, he stops at 3000 until he takes time to level up. But your example is not an entirely common one, and one I don't think the rules were written to handle. I imagine the author of the DMG would say these kinds of situations, rare as they are, ought to be left to the DM to handle as he sees fit. I know that's not the answer you probably want to hear, but it's the best I can do.
And if he does lose some then how much, what is he limited to?
I would prefer the term "missed out on" XP first of all, because we aren't talking about an actual XP loss. Second, I don't think the rules ever address an exact number, but rather a point in time. The thief stops gaining XP (and starts missing out on XP other characters are eligible for) when he reaches enough or more than enough to level. If the DM is handing out XP every time an event occurs that grants XP, the thief will probably stop gaining XP very close to 1001. But if the DM dumps all XP at the end of a long session or adventure, then the thief gets all 3000 XP, so long as the DM finds that appropriate.