André and Quillen both gave constructions of the relative cotangent complex for commutative rings, so pretty immediately that gives us that we understand the cotangent complex for affine schemes. Illusie generalized the cotangent complex construction from "rings over A" for a ring A to "rings over $\mathcal{O}_X$" for a base ring object of an arbitrary Grothendieck topos. At least for ordinary schemes, it doesn't seem too hard to believe that we could glue together relative cotangent complexes along affine opens, but for things like algebraic spaces and/or formal schemes it seems conceivable to me that it might be substantially harder to glue the local modules together while preserving their simplicial structure.

What difficulties with globalizing the local definition of the cotangent complex lead to the topos-theoretic approach used by Illusie? (This is not a history question. I'm just wondering what the motivation is for the greater generality, since I'm currently reading André's book, which only covers the "classical" case of a commutative $A$-algebra for set-theoretic commutative ring $A$.)