In classical contagion models, default systems are Markovian conditionally on
the observation of their stochastic environment, with interacting intensities.
This necessitates that the environment evolves autonomously and is not
influenced by the history of the default events. We extend the classical
literature and allow a default system to have a contagious impact on its
environment. In our framework, contagion can either be contained within the
default system (i.e., direct contagion from a counterparty to another) or spill
from the default system over its environment (indirect contagion). This type of
model is of interest whenever one wants to capture within a model possible
impacts of the defaults of a class of debtors on the more global economy and
vice versa