Basic idea is to run pty output through a lightweight xterm.js instance on the server to enable better terminal session restoration. Related links: - https://github.com/xtermjs/xterm.js/issues/2749 - https://github.com/xtermjs/xterm.js/pull/3212 - https://github.com/xtermjs/xterm.js/pull/3214 - https://github.com/xtermjs/xterm.js/pull/3101