Diane Dennis called my attention to this post and asked if I had an answer or at least some input. I am an attorney practicing in San Diego, and unfortunately for many of my subcontractor clients, this issue is all too common.The short answer to the question is: The subcontractor may stop work if the prime contractor has materially (i.e., substantially) breached its contractual payment obligations to the subcontractor. The problem is that it is very difficult to clearly determine whether there is a material breach without looking closely at many factors.
Whether the prime contractor is in breach depends on the terms of the subcontract and also the terms of the prime contract between the entity and the prime contactor. It depends on how much has been paid to the prime contractor by the entity, whether these payments are past due, by how much they are past due, the total amount that is past due (insignificant versus significant amount) and whether there are any disputes between the entity and prime contractor about the quality of work. Perhaps more important are these same issues as they affect the subcontractor-prime contractor relationship, especially the "quality of work" question.
"Pay If Paid" clauses are unenforceable, however they entitle a prime contractor to withhold payment for a reasonable time if the prime has not been paid by the owner. This "reasonable time" issue can create some very difficult questions as to whether or not the prime contractor is in breach.
Also, the non-payment by the prime contractor must be of a significant amount and the delay signifiacant as well, otherwise the subcontractor may not be justified in walking off of the job.
There might also be terms in the subcontract that expressly dictate a subcontractor's rights upon non-payment. The subcontract might also discuss the ongoing relationship of the entity and the sub in the event of non-payment by the prime.
There are numerous other factors, as well.
BOTTOM LINE: The basic answer to the question is simple. If a subcontractor is not in breach but the prime is in breach, the sub may walk off the job and recover on stop notice and payment bond claims for the value of its work. However, the hard part is evaluating the contract terms and resolving the questions related to whether the subcontractor or the prime is in breach. Those questions cannot be confidently answered without looking closely at the circumstances of payment and the work performed.
Bankruptcy adds a whole new flavor to the pot of stew.
If a subcontractor walks off of a job without justification, it can be subject to paying the completion costs and all resulting damages to the prime. Therefore, it is not a step to be taken haphazardly.
If a sub walks off of a job with justification, it is usually entitled to only the value of the work it performed the contractor and on its third party rights (stop notice, payment bond, mechanic's lien). It is difficult to recover lost profits related to the remaining work, although it is possible if the sub can not work on any alternate jobs during the time period that it was going to be finishing the job it walked off.
That's not much help, I realize. Unfortunately, subcontracts are often written with many provisions favoring the prime contractor. Because of this, the answer to your question depends on the exact terms of the subcontract as well as the prime contract, and more detailed factual issues related to payment and the work performed.
I cannot stress enough how important it is to consult an attorney before taking any drastic action on a job. The attorney will need to review the contract documents in detail and then all facts that affect the contract terms, such as the provisions re timing of payment and any other possible bases for the prime contractor to avoid being found in breach. Unfortunately for a subcontractor (like your company) which would like a simple confirmation that it can walk off of a job when it is not paid, it is impossible to answer the question of whether the prime contractor has breached its payment obligation to the subcontractor without knowing the specifics of the contract and what actually happened on the job.