This question was previously asked over at math.SE.

Let $X$ be a scheme. Let $\mathcal{E}$ be a sheaf of sets on $X$. Then we can define $\mathcal{O}_X\langle\mathcal{E}\rangle$, the *free module over $\mathcal{E}$*, as the sheafification of the presheaf
$$ U \longmapsto \mathcal{O}_X(U)\langle\mathcal{E}(U)\rangle. $$
The stalk of $\mathcal{O}_X\langle\mathcal{E}\rangle$ at a point $x \in X$ is the free module $\mathcal{O}_{X,x}\langle\mathcal{E}_x\rangle$. It can also be described as $f_! f^{-1} \mathcal{O}_X$, where $f : \operatorname{Ét}(\mathcal{E}) \to X$ is the projection of the étalé space associated to $\mathcal{E}$.

In the case that $\mathcal{E}$ is a constant sheaf $\underline{M}$ with stalks some set $M$, the sheaf of modules $\mathcal{O}_X\langle\mathcal{E}\rangle$ coincides with $\mathcal{O}_X^{\oplus M}$ and is therefore free and in particular quasicoherent. In the case that $\mathcal{E}$ is a locally constant sheaf, the sheaf of modules $\mathcal{O}_X\langle\mathcal{E}\rangle$ is locally free and therefore too quasicoherent.

I'm wondering whether the converse holds: **Does quasicoherence of $\mathcal{O}_X\langle\mathcal{E}\rangle$ imply that $\mathcal{E}$ is locally constant?**

This looks like a simple statement, but I have been unable to prove it or come up with a counterexample. I know some indications that it's true:

If $X$ happens to be local as a topological space (spectrum of a local ring), then the converse holds: Using $(\mathcal{O}_X\langle\mathcal{E}\rangle)(X) \cong \mathcal{O}_X(X)\langle\mathcal{E}(X)\rangle$ (this requires locality) one can show that the canonical morphism $\underline{\mathcal{E}(X)} \to \mathcal{E}$ is an isomorphism.

As a consequence, if $\mathcal{O}_X\langle\mathcal{E}\rangle$ is quasicoherent, the pullback of $\mathcal{E}$ to any of the $\operatorname{Spec}(\mathcal{O}_{X,x})$ is constant. Thus $\mathcal{E}$ is "constant on all infinitesimal neighbourhoods".

If $\mathcal{O}_X\langle\mathcal{E}\rangle$ is not only quasicoherent, but even of finite presentation, then $\mathcal{E}$ is locally constant (with finite stalks).

If we assume that $\mathcal{O}_X\langle\mathcal{E}\rangle$ is not only quasicoherent, but even locally free (locally isomorphic to a module of the form $\mathcal{O}_X^{\oplus M}$), then locally we have $\mathcal{O}_{X,x}\langle\mathcal{E}_x\rangle \cong \mathcal{O}_{X,x}\langle M\rangle$, so $\mathcal{E}_x \cong M$, so at least the stalks are locally constant.

Let $j : V \hookrightarrow X$ be the inclusion of an open subset. Let $\mathcal{E}$ be $j_!(1)$, the extension of the terminal sheaf on $V$ by the empty set, explicitly given by $U \mapsto \{ \heartsuit \,|\, U \subseteq V \}$. This sheaf is locally constant iff $V$ is a clopen subset. Now furthermore assume that $X$ is integral. In this case we know that $\mathcal{O}_X\langle\mathcal{E}\rangle = j_!(\mathcal{O}_V)$ (extension by zero this time) is quasicoherent iff $V$ is a clopen subset. Therefore the converse holds in this case.

I'm interested in the question for the following reason: We can characterize quasicoherence in the internal language of the little and the big Zariski toposes of a scheme. (The first statement is already written up in these rough notes, Section 9, the case of the big Zariski topos will be soon.) We can also, quite trivially, characterize sheaves of the form $\mathcal{O}_X\langle\mathcal{E}\rangle$ in the internal language. If those sheaves turned out to be quasicoherent only if the basis sheaf is locally free, then we could characterize locally constant sheaves in the internal language. This would be quite nice and somewhat surprising.