Hi Oleksandr, This error is also depending on the current directory. Or actually just how long the current $PWD is. If you go to /tmp then printf '%4090s' x should trigger the error. I think this error is triggered when the commands output is less than 4096 but the sum of the commands output plus the size of current $PWD is above 4096. (Or N*4096). Bash appends the $PWD to the commands output to tell term.el the current directory. This is made invisible by term.el. On the way from the shell to term.el there seem to be something that splits stuff that is greater than 4096 into fragments. And term.el do not currently handle when the $PWD is split across two fragments. Attached is term-fix.el which contains the term-emulate-terminal function with the patch applied. If you evaluate that the error should go away. Regards, /Johan