A derivation of the Klein-Gordon equation starts with the following lagrangian for a scalar field ϕ: $$ L=\frac{1}{2}g^{ab}(∇_a\phi)(∇_b\phi)-V(\phi) $$ If we plug this lagrangian in the Euler-Lagrange equations: $$ \frac{∂L}{∂\phi} - ∇_a \left[ \frac{∂L}{∂(∇_a\phi)} \right]=0 $$ we obtain: $$ \frac{∂L}{∂\phi} = -\frac {dV}{d\phi} $$ and $$ ∇_a \left[ \frac{∂L}{∂(∇_a\phi)} \right] = ∇_a \left[ \frac{1}{2}g^{ab} \cdot 2(∇_a\phi) \right] = g^{ab} \cdot ∇_a ∇_b \phi = ∇^a ∇_a \phi=\Box^2 \phi, $$ resulting in a generalised form for the KG equation: $$ \Box^2+\frac {dV}{d\phi}=0 $$ For a potential of the form $$ V(\phi)=\frac{1}{2}m^2\phi^2, $$ we obtain $$ (\Box^2+m^2)\phi=0 $$ This is the KG equation form that I tend to find in QFT books. And since I can derive it myself, I am happy with it.
However, in most books related to General Relativity (Hobson et al. being an illustrative exception), and in numerical relativity papers, I find this other version of the KG equation: $$ (\Box^2-m^2)\phi=0 $$ I am very puzzled by the negative sign on the matter term, and when you try to do some numerical relativity calculations, this sign matters a lot.
Does anyone know what the origin of this discrepancy is?
Is it perhaps a question of different sign conventions? If so, please elaborate.