Hello everyone, Org babel eshell does not work well with the :session argument. In particular if the the command does not exit immediately then the results can be arbitrary and can vary from one call to the other. Also, the results often include the actual calling line. Notice that executing things with sh src code does not have this session management problem. So it seems to really be bug. This code illustrates the problem. #+BEGIN_SRC eshell :results output drawer echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer :session test1 echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer sleep 1 ; echo test #+END_SRC #+RESULTS: :results: test :end: #+BEGIN_SRC eshell :results output drawer :session test2 sleep 1 ; echo test #+END_SRC #+RESULTS: :results: ~/Mail $ sleep 1 ; echo test :end: Best, Gennady Emacs : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-29 Package: Org mode version 9.3.1 (release_9.3.1-73-g93c11d @ /home/guraltsev/.emacs.d/straight/build/org/) current state: ============== (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-edit-src-content-indentation 0 org-src-tab-acts-natively t org-odt-format-headline-function 'org-odt-format-headline-default-function org-special-ctrl-a/e t org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-reveal-start-hook '(org-decrypt-entry) org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-id ol-info ol-irc ol-mhe org-mouse org-protocol ol-rmail ol-w3m ol-eshell ol-git-link ol-man org-toc) org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id org-mode-hook '(#[0 "\b\205.