Take a nice space $X$. Let us call a local system on $X$ a functor from the fundamental groupoid of $X$ to groups, so that $G$ is a local system on $X$ if for each $x \in X$ there is a group $G_x$ and for each homotopy class of paths $h$ from $x$ to $y$ there is an isomorphism $h_* : G_x \to G_y$ (plus additional conditions coming from the functor axioms).
A local system morphism $\alpha : G \to H$ is a natural transformation between such functors, that is for each $x$ we have a group morphism $\alpha_x : G_x \to H_x$ and these are compatible with the isomorphisms $h_*$ so that $h\alpha_x = \alpha_yh$. A local system morphism has well-defined kernel and image, which are both local systems. A local system extension is a short exact sequence of local systems $$1 \to A \to G \to H \to 1.$$
Question: assume now $A$ is abelian and moreover it is a trivial local system, that is the constant functor with value $A$ at every $x \in X$. What is the necessary and sufficient condition for such an extension to split, that is when does that projection $G \to H$ have a right inverse as a local system morphism?
Note that for this extension to split at a single point $x$ it is necessary and sufficient that the class of the extension at $x$ vanish in $H^2(H_x; A)$, but it is not enough because $\pi_1(X,x)$ may act nontrivially on $G_x$ and $H_x$, which yields a further obstruction living in $H^1(\pi_1(X,x);\text{Hom}(H_x,A))$. As soon as this obstruction vanishes, the extension splits in the sense that I'm interested in. However, splitting the problem into two separate obstructions seems a bit unnatural to me, and I would like to gain better understanding of this, maybe as some higher-level obstruction in sheaf cohomology or something similar.