  For a Lie algebroid pair $A\hookrightarrow L$ we study cocycles constructed
from the extension to $L$ of the higher connection forms of a representation up
to homotopy $E$ of the Lie algebroid $A$. We show that there exists a
cohomology class with values in the endomorphism bundle of $E$ that is
independent of the extension above and vanishes whenever a homotopy
$A$-compatible extension exists. Whenever the representation up to homotopy $E$
is the resolution of a Lie algebroid representation $K$ of $A$, it is shown
that there exists a quasi-isomorphism sending the new Atiyah class to the
classical one, associated to extensions to $L$ of the Lie algebroid
representation $K$.
