We show that an accessible group with infinitely many ends has property \(R_{\infty }\) . That is, it has infinitely many twisted conjugacy classes for any twisting automorphism. We deduce that having property \(R_{\infty }\) is undecidable amongst finitely presented groups. We also show that the same is true for a wide class of relatively hyperbolic groups, filling in some of the gaps in the literature. Specifically, we show that a non-elementary, finitely presented relatively hyperbolic group with finitely generated peripheral subgroups which are not themselves relatively hyperbolic, has property \(R_{\infty }\) .