# Keep terminal buffer on disconnect

**URL:** https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094
**Category:** Royal TSX (for macOS)
**Created:** [November 30, 2019, 7:42pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094 "2019-11-30T19:42:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![michael\_bunkin](https://community.royalapps.com/user_avatar/community.royalapps.com/michael_bunkin/32/444_2.png) [@michael\_bunkin](https://community.royalapps.com/u/michael_bunkin)
#### Post date: [November 30, 2019, 7:42pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/1 "2019-11-30T19:42:08Z")

</div>

Disconnections can interrupt a terminal session, and sometimes it is important to see the history of what happened in the shell before the disconnection occurred. I have “Keep disconnected tabs open” enabled and “Close tab when session end” disabled, yet after reconnect the terminal buffer is cleared. I don’t know whether this happens by design or due to a bug.

---

<div class="post-metadata">

### Author: ![felix\_deimel](https://community.royalapps.com/user_avatar/community.royalapps.com/felix_deimel/32/18_2.png) [@felix\_deimel](https://community.royalapps.com/u/felix_deimel)
#### Post date: [December 2, 2019, 8:34am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/2 "2019-12-02T08:34:31Z")

</div>

Hi Michael,

that’s by design. As you mentioned, the history is available as long as you don’t close the tab or reconnect the session. After one of those actions, it’s gone though.

cheers,

felix

---

<div class="post-metadata">

### Author: ![fabio](https://community.royalapps.com/user_avatar/community.royalapps.com/fabio/32/455_2.png) [@fabio](https://community.royalapps.com/u/fabio)
#### Post date: [May 29, 2020, 11:14am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/3 "2020-05-29T11:14:26Z")

</div>

@Felix can you check how apps like ConEmu/Kitty/Putty do it? Even after they get disconnected, if you ask for a re-connect, you keep the buffer as was.

---

<div class="post-metadata">

### Author: ![vincent\_sit](https://community.royalapps.com/user_avatar/community.royalapps.com/vincent_sit/32/503_2.png) [@vincent\_sit](https://community.royalapps.com/u/vincent_sit)
#### Post date: [August 4, 2021, 1:10am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/4 "2021-08-04T01:10:13Z")

</div>

I’m looking for a replacement for Xshell on the Mac platform, and Royal TSX is the best choice so far, but I don’t understand since we use iTerm 2 as the terminal plug-in, why automatically clear the buffer when disconnected. iTerm 2 is not designed to do that. I hope the author can seriously consider this feature, after all, most of the products in the market don’t do this, users have this need, at least add a switch for users to decide if they want to empty it or not. I’m looking forward to seeing this feature implemented in a future update. Thank you.

---

<div class="post-metadata">

### Author: ![vincent\_sit](https://community.royalapps.com/user_avatar/community.royalapps.com/vincent_sit/32/503_2.png) [@vincent\_sit](https://community.royalapps.com/u/vincent_sit)
#### Post date: [August 9, 2021, 8:59am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/5 "2021-08-09T08:59:09Z")

</div>

Hello Felix,

Any further update on this topic?

This is a very important feature, which is supported by other competing products. Hopefully it will be implemented. Very important for users with bad networks, such as firewalls that cause frequent disconnections and can lose context.

Regards,

Vincent

---

<div class="post-metadata">

### Author: ![jonas\_jacobsson](https://community.royalapps.com/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@jonas\_jacobsson](https://community.royalapps.com/u/jonas_jacobsson)
#### Post date: [December 3, 2021, 7:17am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/6 "2021-12-03T07:17:51Z")

</div>

I agree with previous posts. I was just about to add this as a feature request myself. It’s extremely annoying that the screen and buffer is cleared when reconnecting.

Sure, when doing “restart session” in the menu in iTerm2, it also resets the terminal. Perhaps it is the same “function” it does in Royal TSX too. But the question is if it is possible for Royal TSX to keep the buffer and screen.

---

<div class="post-metadata">

### Author: ![branko\_zavrl](https://community.royalapps.com/letter_avatar_proxy/v4/letter/b/e19b73/32.png) [@branko\_zavrl](https://community.royalapps.com/u/branko_zavrl)
#### Post date: [November 29, 2022, 1:08pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/7 "2022-11-29T13:08:58Z")

</div>

Would also love to have this option, when reconnecting - to keep the previous history opened.

---

<div class="post-metadata">

### Author: ![bo\_i2](https://community.royalapps.com/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@bo\_i2](https://community.royalapps.com/u/bo_i2)
#### Post date: [July 16, 2023, 11:06am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/8 "2023-07-16T11:06:31Z")

</div>

This missing feature is the only thing stopping me from purchasing a license. Being able to keep the history after a (accidental) disconnect is essential for me.

Please reconsider the design if possible.

---

<div class="post-metadata">

### Author: ![rafael\_carvallo](https://community.royalapps.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rafael\_carvallo](https://community.royalapps.com/u/rafael_carvallo)
#### Post date: [August 3, 2023, 1:50pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/9 "2023-08-03T13:50:59Z")

</div>

I also need this feature, I got the license thinking I would get the same features and maybe more than MobaXTerm but for Mac, however, it looks like it isn’t the case. I can’t seem to find a way to make this happen. Keeping the buffer even after a connection closes is a must.

---

<div class="post-metadata">

### Author: ![vincent\_sit](https://community.royalapps.com/user_avatar/community.royalapps.com/vincent_sit/32/503_2.png) [@vincent\_sit](https://community.royalapps.com/u/vincent_sit)
#### Post date: [August 3, 2023, 5:19pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/10 "2023-08-03T17:19:05Z")

</div>

Hi everyone, my current solution for this is to use the Logging feature, as it can redirect all the buffers to a file in real-time. So when the session gets disconnected accidentally, I can still access the previous logs in the log files.

---

<div class="post-metadata">

### Author: ![steve\_fuller](https://community.royalapps.com/letter_avatar_proxy/v4/letter/s/f6c823/32.png) [@steve\_fuller](https://community.royalapps.com/u/steve_fuller)
#### Post date: [April 25, 2024, 9:43pm UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/11 "2024-04-25T21:43:44Z")

</div>

I don’t mind that this is the default, but a checkbox to disable this feature would be most welcome. The logging work around is “OK” but not always the best thing for workflow.

---

<div class="post-metadata">

### Author: ![bruno\_lancaster](https://community.royalapps.com/letter_avatar_proxy/v4/letter/b/d6d6ee/32.png) [@bruno\_lancaster](https://community.royalapps.com/u/bruno_lancaster)
#### Post date: [July 14, 2025, 9:45am UTC](https://community.royalapps.com/t/keep-terminal-buffer-on-disconnect/1094/12 "2025-07-14T09:45:46Z")

</div>

Any updates on this topic?
