  The second law of thermodynamics, formulated as an ultimate bound on the
maximum extractable work, has been rigorously derived in multiple scenarios.
However, the unavoidable limitations that emerge due to the lack of control on
small systems are often disregarded when deriving such bounds, which is
specifically important in the context of quantum thermodynamics. Here, we study
the maximum extractable work with limited control over the working system and
its interaction with the heat bath. We derive a general second law when the set
of accessible Hamiltonians of the working-system is arbitrarily restricted. We
then apply our bound to particular scenarios that are important in realistic
implementations: limitations on the maximum energy gap and local control over
many-body systems. We hence demonstrate in what precise way the lack of control
affects the second law. In particular, contrary to the unrestricted case, we
show that the optimal work extraction is not achieved by simple thermal
contacts. Our results do not only generalize the second law to scenarios of
practical relevance, but also take first steps in the direction of local
thermodynamics.
