You thought it was safe then forgot what the code was

A play on words: you need a code to open a safe. Most other rappers thought it was safe to say or be #1 but Kendrick wasn’t having it. They forgot what their code was; they aren’t competing on his level. .

Another interpretation to this line is: An allusion to the G code: if you obey it, then your allies’ll keep you safe, but if you forget it, then you’ve betrayed the familia.

The line also sounds like “You thought it was safe then forgot what the COLD was”, which would’ve tied in perfectly with the previous line with its allusions to Hell’s freezing.