  We study the cosmological evolution of a scalar field in Horndeski gravity,
assuming that the scalar field is subdominant with respect to the cosmic fluid.
We first analyse the most general shift-symmetric action that respects local
Lorentz symmetry. We show that the bound on the speed of gravitational waves
set by GW170817+GRB170817A imposes a constraint only on the linear coupling
between the scalar and the Gauss-Bonnet invariant and this constraint is rather
mild. Then, we consider some interesting examples of theories that break
shift-symmetry, such as the Damour-Esposito-Far\`ese model of spontaneous
scalarization and a theory with a quadratic coupling to the Gauss-Bonnet
invariant that can lead to black hole scalarization. In both cases, tuning of
cosmological initial conditions is necessary to keep the scalar field dormant
during cosmic evolution.
