A mucosal infectious disease episode can render the host either more or less susceptible to recurrent infection, but the specific mechanisms that tip the balance remain unclear. We investigated this question in a mouse model of recurrent urinary tract infection and found that a prior bladder infection resulted in an earlier onset of tumor necrosis factor-alpha (TNFa)- mediated bladder inflammation upon subsequent bacterial challenge, relative to age-matched naive mice. However, the duration of TNFa signaling activation differed according to whether the first infection was chronic (Sensitized) or self-limiting (Resolved). TNFa depletion studies revealed that transient early-phase TNFa signaling in Resolved mice promoted clearance of bladder-colonizing bacteria via rapid recruitment of neutrophils and subsequent exfoliation of infected bladder cells. In contrast, sustained TNFa signaling in Sensitized mice prolonged damaging inflammation, worsening infection. This work reveals how TNFa signaling dynamics can be rewired by a prior infection to shape diverse susceptibilities to future mucosal infections.