We study a linear price impact model, including other liquidity takers, whose flow of orders is driven by a Hawkes process. The optimal execution problem is solved explicitly in this context, and the closed-form optimal strategy describes in particular how one should react to the orders of other traders. This result enables us to discuss the viability of the market. It is shown that Poissonian arrivals of orders lead to quite robust price manipulation strategies in the sense of Huberman and Stanzl (Econometrica, 72:1247–1275, 2004). Instead, a particular set of conditions on the Hawkes model balances the self-excitation of the order flow with the resilience of the price, excludes price manipulation strategies, and gives some market stability.