A permutation $\pi$ is a \emph{merge} of a permutation $\sigma$ and a permutation $\tau$, if we can color the elements of $\pi$ red and blue so that the red elements have the same relative order as $\sigma$ and the blue ones as~$\tau$. We consider, for fixed hereditary permutation classes $\cC$ and $\cD$, the complexity of determining whether a given permutation $\pi$ is a merge of an element of $\cC$ with an element of~$\cD$.
We develop general algorithmic approaches for identifying polynomially tractable cases of merge recognition. Our tools include a version of nondeterministic logspace streaming recognizability of permutations, which we introduce, and a concept of bounded width decomposition, inspired by the work of Ahal and Rabinovich.
As a consequence of the general results, we can provide nontrivial examples of tractable permutation merges involving commonly studied permutation classes, such as the class of layered permutations, the class of separable permutations, or the class of permutations avoiding a decreasing sequence of a given length. On the negative side, we obtain a general hardness result which implies, for example, that it is NP-complete to recognize the permutations that can be merged from two subpermutations avoiding the pattern 2413.