Living cells adapt and respond actively to the mechanical properties of their environment. In addition to biochemical mechanotransduction, evidence exists for a myosin-dependent purely mechanical sensitivity to the stiffness of the surroundings at the scale of the whole cell. Using a minimal model of the dynamics of actomyosin cortex, we show that the interplay of myosin power strokes with the rapidly remodeling actin network results in a regulation of force and cell shape that adapts to the stiffness of the environment. Instantaneous changes of the environment stiffness are found to trigger an intrinsic mechanical response of the actomyosin cortex. Cortical retrograde flow resulting from actin polymerization at the edges is shown to be modulated by the stress resulting from myosin contractility, which in turn, regulates the cell length in a forcedependent manner. The model describes the maximum force that cells can exert and the maximum speed at which they can contract, which are measured experimentally. These limiting cases are found to be associated with energy dissipation phenomena, which are of the same nature as those taking place during the contraction of a whole muscle. This similarity explains the fact that single nonmuscle cell and wholemuscle contraction both follow a Hill-like force-velocity relationship. -5). This behavior is strongly dependent on the contractile activity of the actomyosin network (6-10). One of the cues driving the cell response to its environment is rigidity (11). Cells are able to sense not only the local rigidity of the material with which they are in contact (12) but also, the one associated with distant cell substrate contacts. This ability has been demonstrated by tracking the amount of extra force needed to achieve a given displacement of microplates between which the cell is placed (13, 14) (Fig. 1B), of an atomic force microscope (AFM) cantilever (15, 16) or elastic micropillars (17). This cell-scale rigidity sensing is totally dependent on myosin-II activity (13). A working model of the molecular mechanisms at play in the actomyosin cortex is available (18), where myosin contraction, actin treadmilling, and actin cross-linker turnover are the main ingredients. Phenomenological models (19, 20) of mechanosensing have been proposed but could not bridge the gap between the molecular microstructure and this cell-scale phenomenology. Here, we show that the collective dynamics of actin, actin cross-linkers, and myosin molecular motors are sufficient to explain cellscale rigidity sensing: depending on the tension that can be borne by the environment, there is a change of the fraction of myosin molecules which perform mechanical work that is effectively transmitted rather than dissipated. The model derivation is analogous to the one of rubber elasticity of transiently cross-linked networks (21), with the addition of active crosslinkers accounting for the myosin. It involves four parameters only: myosin contractile stress, speed of actin treadmilling, elastic modulus, and viscoela...