Ambiguous. I hate trying to avoid this problem, and I get a little annoyed when people solve it with something like "Alex told Sam that Sam was late." I try not to repeat the same word in a sentence unless it's really necessary, or there's some point to the repetition.