TITLE: Projective module which splits off sequence of submodules, but not the sum
QUESTION [5 upvotes]: Does there exist an example of a module $X$ over some ring $R$ together with submodules $T_i$ such that:

$X$ is projective,
$X$ splits as an internal direct sum $X\cong T_1\oplus T_2\oplus \ldots \oplus T_n\oplus S_n$ (with some $S_n$) for every $n$,
$X$ does not split off the infinite direct sum $\bigoplus_{i=1}^\infty T_i$,
$R$ is hereditary.

Remark: I also don't know the answer without the last condition, so this would already be interesting, though for my specific application I definitely need all conditions.

REPLY [3 votes]: Here is an example if we interpret all direct sums as internal direct sums.
Example. Let $R$ be a discrete valuation ring with uniformiser $\pi$ and fraction field $K$. Let $X = R^{(\mathbf N)}$, and let $T_i$ be the free rank $1$ submodule with basis $\pi e_{i+1}-e_i$. Then the natural map
$$\bigoplus_{i=1}^n T_i \to X$$
is injective with image $T_{\leq n} = \operatorname{span}(\pi e_2 - e_1, \ldots, \pi e_{n+1} - e_n)$, because the latter clearly has rank $n$. Moreover,
$$S_n = \bigoplus_{i > n} Re_i \subseteq X$$
is a complement of $T_{\leq n}$: one easily sees that $S_n \cap T_{\leq n} = 0$, and they span $X$ because $e_n = \pi \cdot e_{n+1} - (\pi e_{n+1} - e_n)$, etcetera. But if $T = \bigoplus_{i \in \mathbf N} T_i = \sum_i T_i \subseteq X$, then
\begin{align*}
X/T &\stackrel\sim\to K\\
e_i &\mapsto \pi^{-i}.
\end{align*}
This surjection does not split because $X$ has no infinitely divisible elements. $\square$
What's going on is that we wrote $K$ as a filtered colimit of surjections $S_n \twoheadrightarrow S_{n+1}$ of free modules:
$$K = \underset{\substack{\longrightarrow \\ n}}{\operatorname{colim}}\ S_n.$$
Each $X \twoheadrightarrow S_n$ has a splitting $S_n \hookrightarrow X$, but $X \twoheadrightarrow K$ does not.