  We combine the processes of resetting and first-passage to define
\emph{first-passage resetting}, where the resetting of a random walk to a fixed
position is triggered by a first-passage event of the walk itself. In an
infinite domain, first-passage resetting of isotropic diffusion is
non-stationary, with the number of resetting events growing with time as
$\sqrt{t}$. We calculate the resulting spatial probability distribution of the
particle analytically, and also obtain this distribution by a geometric path
decomposition. In a finite interval, we define an optimization problem that is
controlled by first-passage resetting; this scenario is motivated by
reliability theory. The goal is to operate a system close to its maximum
capacity without experiencing too many breakdowns. However, when a breakdown
occurs the system is reset to its minimal operating point. We define and
optimize an objective function that maximizes the reward (being close to
maximum operation) minus a penalty for each breakdown. We also investigate
extensions of this basic model to include delay after each reset and to two
dimensions. Finally, we study the growth dynamics of a domain in which the
domain boundary recedes by a specified amount whenever the diffusing particle
reaches the boundary after which a resetting event occurs. We determine the
growth rate of the domain for the semi-infinite line and the finite interval
and find a wide range of behaviors that depend on how much the recession occurs
when the particle hits the boundary.
