This is a good question, Wayne, especially considering how many bankruptcies have been filed in the past few years. I should first say that, being an employment lawyer, what I don't know about bankruptcy law is a whole lot. However, I'll do my best to explain why there's no easy answer to this question. If there are any bankruptcy lawyers out there who want to chime in, I'd love your help answering this.
Executory contracts: Most employment contracts appear to be considered "executory contracts," which are defined as "a contract under which the obligation of both the bankrupt and the other party to the contract are so unperformed that the failure of either to complete performance would constitute a material breach excusing the performance of the other." If it's in this category, then the contract becomes part of the bankruptcy estate, which means it no longer belongs to your employer, but instead belongs to the trustee or the debtor in possession.
Bankruptcy estate: Once it is considered part of the bankruptcy estate, the trustee or debtor in possession will decide whether to assume the contract or reject it.
Contract is assumed: If they assume it, then it remains intact and the bankruptcy estate assumes responsibility for it. That means if your noncompete is part of an employment contract requiring payment of wages and other benefits, the estate has to take these responsibilities on.
Contract is rejected: If they reject the contract, then you can treat it as if they breached it on the date the bankruptcy was filed. Even if the contract is rejected, that doesn't necessarily mean you're out of the non-competition part of it though. Some courts have allowed employers to seek injunctive relief against employees for breaching a noncompete even when the contract was rejected.
One analysis of the case law on these issues is here. In short, it sounds like there's no easy out of a noncompete agreement just because your employer is in bankruptcy. I'd suggest talking to a bankruptcy lawyer in your state about your rights.