You get more warning if it's a larger company. In small companies, the warning can be zero.
As soon as a manager puts something negative in writing, that's a warning sign. If you get something to the effect of, "On September 4, we discussed <X> and you agreed to <Y>, but then you <Z>," you should know that something's up. There will probably be factual inaccuracies. You should correct your boss, in writing, but don't expect it to do any good in terms of keeping your job. You just do that to make it clear that you can play the documentation game too, and that you won't go down without a fight, so they are more likely to give you more time to get out on your own terms, and severance if they eventually fire you.
A PIP is a dead giveaway. Almost no one passes PIPs. You either fail (and get fired) or it's ruled "inconclusive", which means you might face another PIP in 6 months. (HR didn't think you could cheaply be fired. "Inconclusive" means you have the same boss, more pissed off.) The only time people pass PIPs is when they change manager mid-PIP (and that's usually only possible when your current manager leaves, because people don't want PIP'd employees to transfer to their teams) and the new manager likes them.
Once you're on a PIP, you better be job searching. Document every interview as a sick day, related to a disclosed health problem, and demand that your manager and HR accommodate it by adding time on the PIP. They hate that. It's not going to save your job, but it sets the precedent that things are happening on your terms. Demand a time study for a PIP and, if they laugh that off, say that you're going to talk to some unions about getting the performance evaluation process (including your PIP) evaluated for time study. (If they fire you early, they're guilty of retaliation. They can still, however, legally fire you at the end of your PIP.) Remember: your goal isn't to keep your job (you can't) but to scare them into paralysis or capitulation, in order to get out on your own terms. Once you get another job, tell absolutely no one where you're going until you've been in the new place for at least 6 months. You don't want your boss or some other adversary finding out where you're heading and shoot you down.
The termination endgame is unpredictable and dangerous no matter what, so you can't bank on anything. Even if you do everything right, you may not get a severance, and you may be fired early even if you think they legally can't. (At-will employment is intensely complicated and often has undefined behavior, but this also means that some companies take chances that no lawyer would endorse.) So don't bank on a severance. Your goal really should be to get another job, while you're still employed, before the axe falls. The benefit of being employed while job searching is worth more than a severance. Already-employed people easily get 10% higher salaries, and are assigned to better projects, and when you multiply this by, say, five years... the math favors changing jobs before the severance conversation can happen. Your new employer will just put you on a better track if it's poaching you than if you're seen as having come off the street.
If you do end up in a severance negotiation and the cash is enough to cover the expected length of a job search, take it. Ask for the right to represent yourself as employed. You may want to get agreement on a good reference, but that's not as important if you're pretty sure they won't give you a bad reference. (Obviously, you won't want to use your manager.) Use a peer or an ally for a reference.
If you're fired during a job search process, don't update any companies that you're currently interviewing with on that development. (It does no good, because no one will consider you ethically obligated to do so.) You also don't want to update your CV. As for whether you continue to represent yourself as employed, if you've been given that right formally, the answer is an obvious yes. If you haven't, the answer is "it depends." In that case, you have to weigh the risk of getting caught against the risk of having your unemployment counted against you.
This question originally appeared on Quora: How do you know if you're going to soon be fired and what can you do about it?