oh man i wonder what happened after 1926 and Lenin's death
Stalin was threatening to resign because of Lenin's Testament, in which Lenin criticised and warned about a schism inside of the party after his death and particularly about Stalin's corruption as General Secretary. There was a legitimate possibility of the party ousting Stalin and replacing his position with one of their own, however, if Stalin resigns, then he would walk away and still pose a threat, as well as leave uncertainty over who gets his position. After he eliminated his opponents, his resignation threats were a way to test his party's loyalty.