If you and your insurer disagree about whether the insurer has a duty to defend or indemnify you, either you or your insurer can file a "declaratory judgment" lawsuit. It is called a "declaratory judgment" because the plaintiff (the person filing the lawsuit) is seeking a "declaration" by the court that the plaintiff's interpretation of the insurance policy is correct.
The current law in Massachusetts is that if an insured wins a declaratory judgment lawsuit regarding the duty to defend, the insurer has to pay the attorney's fees incurred by the insured in the declaratory judgment lawsuit. This is true whether the insurer or the insured is the plaintiff in the lawsuit. Even if the insured wins a lawsuit regarding the duty to indemnify, however, the insurer is not obligated to pay the insured's attorney's fees.
There are a number of questions that remain unresolved about attorney's fees. For example, it is unclear what happens if a declaratory judgment lawsuit seeks a declaration about both the duty to defend and the duty to indemnify. In other contexts, where a party is entitled to an award of attorney's fees for some claims but not for others in the same lawsuit, the court will attempt to divide up the attorney's fees between the claims. That is always a difficult undertaking, but it would be particularly hard to divide the time spent by the attorney between the duty to defend and the duty to indemnify, because the two issues are so interrelated.
I will write more about the logistics of a declaratory judgment lawsuit in a later post.