A group $H$ is called a retract of a group $G$ if there exists homomorphisms $f:H\to G$ and $g:G\to H$ such that $gf=id_H$.
Given a group $G$ with identity element 1, a subgroup $H$, and a normal subgroup $N$ of $G$; $G$ is called the semidirect product of $N$ and $H$, written $G = N\rtimes H$ , if $G = NH$ and $H\cap N=1$. Then $H$ is called a semidirect factor of $G$.
We can easily see that a group $H$ is a retract of $G$ iff $Im(f)$ is a semidirect factor of $G$ (In fact, by the above notation, we have $G=ker(g)\rtimes Im(f)$).
Of course, finite groups have finitely many retracts. On the other hand, by Does finitely generated groups have finitely many finite retracts? , not every finitely generated group has finitely many (finite) retracts. My questions is that is there any finitely presented group with only finitely many (finite) retracts?