  Thermal pulses are fundamental to the chemical evolution of AGB stars and
their circumstellar envelopes. A further consequence of thermal pulses is the
formation of detached shells of gas and dust around the star. We aim to
determine the physical properties of the detached gas shell around R
Sculptoris, in particular the shell mass and temperature, and to constrain the
evolution of the mass-loss rate during and after a thermal pulse. We analyse
CO(1-0), CO(2-1), and CO(3-2) emission, observed by. The spatial resolution of
the ALMA data allows us to separate the detached shell emission from the
extended emission inside the shell. We perform radiative transfer modelling of
both components to determine the shell properties and the post-pulse mass-loss
properties. The ALMA data show a gas shell with a radius of 19.5" expanding at
14.3km/s. The different scales probed by the ALMA Cycle 0 array show that the
shell must be entirely filled with gas, contrary to the idea of a detached
shell. The comparison to single-dish spectra and radiative transfer modelling
confirms this. We derive a shell mass of 4.5e-3 Msun with a temperature of 50K.
Typical timescales for thermal pulses imply a pulse mass-loss rate of 2.3e-5
Msun/yr. For the post-pulse mass-loss rate, we find evidence for a gradual
decline of the mass-loss rate, with an average value of 1.6e-5 Msun/yr. The
total amount of mass lost since the last thermal pulse is 0.03 Msun, a factor
four higher compared to classical models, with a sharp decline in mass-loss
rate immediately after the pulse. We find that the mass-loss rate after a
thermal pulse has to decline more slowly than generally expected from models of
thermal pulses. This may cause the star to lose significantly more mass during
a thermal pulse cycle, which affects the chemical evolution of the star and the
interstellar medium.
