Does an injective group homomorphism between countable abelian groups that splits over every finitely generated subgroup, necessarily split? Let $G_1$ and $G_2$ be countable abelian groups, and let $\iota\colon G_1\to G_2$ be an injective group homomorphism (so that we may regard $G_1$ as a subgroup of $G_2$). Suppose that for every finitely generated subgroup $K$ of $G_2$, there is a map $\pi_K\colon K\to G_1$ such that $\iota \circ \pi_K\circ \iota= \mbox{id}_{\iota(G_1)\cap K}$ (or if you want to omit $\iota$ from the notation, this would be $\pi_K(g)=g$ whenever $g\in G_1\cap K \subseteq G_2$. 
In other words, for every finitely generated subgroup of $G_2$, one can find a splitting. Does it follow that there is a "global" splitting $\pi\colon G_2\to G_1$ for $\iota$? 
I don't want to assume that the "partial" splittings $\pi_K$ have any sort of coherence (by this I mean that I don't want to assume that whenever $K\subseteq K'$, the splitting $\pi_{K'}$ can be chosen so that $\pi_{K'}$ restricted to $K$ is just $\pi_K$). I also don't want to assume that $G_1$ is finitely generated.
Of course the conclusion would be that $G_1$ is a direct summand in $G_2$.
 A: Here is another concrete example constructed as in Yves Cornulier's comment. Let $G_2$ be the group defined by the (abelian group) presentation
$G_2=\langle\ x,y_i\ (i \ge 0) \mid y_i^2 = y_{i-1}x\ (i \ge 1)\ \rangle$
and $G_1 = \langle x \rangle$. 
Any finitely generated subgroup is contained in $\langle y_i,x\rangle$ for some $i$, which is free abelian of rank $2$, and any subgroup of that splits over its intersection with $\langle x \rangle$.
But a complement of $G_1$ in $G_2$ would be generated by elements $y_i' = y_ix^{k_i}$ for some integers $k_i$ with $y_i'^2 = y'_{i-1}$ for all $i > 1$. But $y_i'^2 = y_{i-1}x^{2k_i+1}$, so $k_{i-1} = 2k_i+1$ for all $i>1$, which is clearly not possible.
A: First consider the extension 
$$ 1 \to \mathbb{Z} \to \widehat{\mathbb{Z}} \to Q \to 1$$
where $\widehat{\mathbb{Z}}$ is the profinite completion of $\mathbb{Z}$, and $Q$ is defined as the cokernel. One can show that $Q$ is an infinite dimensional rational vector space. Now choose some non-zero finite dimensional subspace $V \subset Q$, and consider the corresponding pullback extension
$$ 1 \to \mathbb{Z} \to E \to V \to 1,$$
so $E \subset \widehat{\mathbb{Z}}$ is the pre-image of $V$. Both $\mathbb{Z}$ and $E$ are countable. I claim:


*

*The map $\mathbb{Z} \to E$ does not split: if it was split, then
$E$, and hence $\widehat{\mathbb{Z}}$, would contain a non-zero
rational vector space, which is impossible as $\widehat{\mathbb{Z}}$
is complete for the profinite topology (and hence $n$-adically separated for every $n$).

*For every finitely generated subgroup $G \subset E$, the restricted map
$\mathbb{Z} \cap G \to G$ does split: the cokernel $Q' :=
    G/(\mathbb{Z} \cap G)$ is a finitely generated subgroup of $V$, so
$Q'$ is finite free by the classification of f.g abelian groups, and hence the extension problem is solvable.
