A compact, connected Lie group $G$ is finitely covered by a group of the form $T \times K$, where $T$ is a torus and $K$ is simply-connected. I am under the impression the outer automorphism group $$\mathrm{Aut} (T \times K) / \mathrm{Inn}(T \times K) $$ is just $$\mathrm{Aut}\, T \times \prod_{k} \Big( \big(\prod_{j \in J_k} \mathrm{Aut}\,\Gamma_j \big)\rtimes S_{J_k}\Big),$$
where $J_1 \amalg \cdots \amalg J_n$ is a partition of the indices $j$ corresponding to the partition of the simple factors $K_j$ of $K$ by isomorphism type, $S_{J_k}$ is the symmetric group permuting these factors, and $\Gamma_j$ is the Dynkin diagram of $K_j$
I also think $\mathrm{Out}\,G$ is the subgroup leaving the kernel of $T \times K \twoheadrightarrow G$ invariant (this condition is well-defined because the kernel is central). In the case of a noncompact, still connected Lie group $H$, there is still a maximal compact subgroup $G$, unique up to conjugacy, so any outer automorphism is in the class of an automorphism preserving $G$ and hence induces an automorphism of $G$. Thus $\mathrm{Out}\, H$ can naturally be identified as a subgroup of $\mathrm{Out}\, G$.
The reasoning, such as it is, is basically that the center must remain invariant, all the compositions $K_j \to K \to K_k$ must be Lie group homomorphisms, and "diagonal" homomorphisms $T \to T \times K_k$ or $K_j \to K_j \times K_k$, in case $T,K_j < K$, don't extend to automorphisms of $T \times K_k$ or $K_j \times K_k$ because that would require too much commutativity of $K_k$.
Is this right or have I missed something?
If it is okay, should I have seen this somewhere already? Where?
What's an example of a pair $(H,G)$ and an automorphism of $G$ not extending to $H$?