Hello Noam (and everyone else), Thanks for your quick response. The patch you provided does indeed seem to fix the issue, or at least it hasn't happened for the time I tested it (I can verify various processes were running and outputting things to the async buffer). I do not have any idea as to why did those markers get swapped around. Is there any specific place that deals with them that I could check? Could this be a bug with comint mode, maybe clashing with another package? This is my list of installed packages, directly from package-list-packages: | atom-dark-theme 20181022.1602 installed An Emacs port of the Atom Dark theme from Atom.io. atom-one-dark-theme 20190705.554 installed Atom One Dark color theme avy 20200311.1106 installed Jump to arbitrary positions in visible text and select text quickly. cmake-ide 20190731.1009 installed Calls CMake to find out include paths and other compiler flags cmake-mode 20190710.1319 installed major-mode for editing CMake sources company-quickhelp 20180525.1003 installed Popup documentation for completion candidates company-rtags 20191222.920 installed RTags back-end for company dockerfile-mode 20200106.2126 installed Major mode for editing Docker's Dockerfiles elpy 20200326.2207 installed Emacs Python Development Environment exwm 0.23 installed Emacs X Window Manager glsl-mode 20191017.2148 installed major mode for Open GLSL shader files gruvbox-theme 20200307.1522 installed A retro-groove colour theme for Emacs helm 20200325.757 installed Helm is an Emacs incremental and narrowing framework key-chord 20160227.1238 installed map pairs of simultaneously pressed keys to commands powerline 20200105.2053 installed Rewrite of Powerline smartparens 20200324.2147 installed Automatic insertion, wrapping and paredit-like navigation with user defined pairs. sudo-edit 20180731.1908 installed Open files as another user swiper 20200319.1334 installed Isearch with an overview. Oh, man! zerodark-theme 20190528.923 installed A dark, medium contrast theme for Emacs | If needed I can post (potentially) relevant fragments of my configuration files. Kind regards, Jacob