Feature Request: restart/reload terminal #19928

Closed
opened 2026-01-31 06:57:43 +00:00 by claunia · 14 comments
Owner

Originally created by @sparkchaser on GitHub (May 23, 2023).

It would be helpful if a terminal session could be re-started in situ after it closes.

Background:
I build firmware for embedded devices that I control via SSH. I set up a terminal profile that runs the command ssh.exe <IP> <args>, so now I can open a shell and connect to the device's console with just a keystroke. Everything works great, at least until I flash a new firmware image and the device reboots. The underlying ssh process terminates and I get the "process exited" message. That terminal tab is effectively dead and I have to open a new tab to reconnect. If I try to connect before the device is ready, the ssh command in the new tab will time out and I'll have another dead terminal window to close and re-open. Re-connecting to the device and cleaning up all the old terminal windows is a multi-step process, and I often have to do this every 10-15 minutes. It's even more annoying when using quake mode (which I am now addicted to) since the tabs aren't visible.

It would be extremely helpful if in cases like this there was a command to reuse the existing terminal window and re-start that session from scratch. Disconnect the dead process from the terminal, run the terminal's command again, and attach the new process to the existing terminal instead of spawning a new one. PuTTY has a "restart session" command that does exactly this, and it makes it much easier to work with remote devices that reboot or otherwise drop connection. Being able to restart the process and reconnect to the device with a keystroke or context menu option would make my workflow a lot smoother. Retaining the existing scrollback buffer would be a nice bonus, but that's certainly not a requirement.

Originally created by @sparkchaser on GitHub (May 23, 2023). It would be helpful if a terminal session could be re-started in situ after it closes. Background: I build firmware for embedded devices that I control via SSH. I set up a terminal profile that runs the command `ssh.exe <IP> <args>`, so now I can open a shell and connect to the device's console with just a keystroke. Everything works great, at least until I flash a new firmware image and the device reboots. The underlying ssh process terminates and I get the "process exited" message. That terminal tab is effectively dead and I have to open a new tab to reconnect. If I try to connect before the device is ready, the ssh command in the new tab will time out and I'll have *another* dead terminal window to close and re-open. Re-connecting to the device and cleaning up all the old terminal windows is a multi-step process, and I often have to do this every 10-15 minutes. It's even more annoying when using quake mode (which I am now addicted to) since the tabs aren't visible. It would be extremely helpful if in cases like this there was a command to reuse the existing terminal window and re-start that session from scratch. Disconnect the dead process from the terminal, run the terminal's command again, and attach the new process to the *existing* terminal instead of spawning a new one. PuTTY has a "restart session" command that does exactly this, and it makes it much easier to work with remote devices that reboot or otherwise drop connection. Being able to restart the process and reconnect to the device with a keystroke or context menu option would make my workflow a lot smoother. Retaining the existing scrollback buffer would be a nice bonus, but that's certainly not a requirement.
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 06:57:43 +00:00
Author
Owner

@lhecker commented on GitHub (May 23, 2023):

Have you tried Windows Terminal Preview 1.17 yet? It contains #14060 which sounds like it would work perfectly for you use case.

@lhecker commented on GitHub (May 23, 2023): Have you tried Windows Terminal Preview 1.17 yet? It contains #14060 which sounds like it would work perfectly for you use case.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (May 27, 2023): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@sparkchaser commented on GitHub (May 27, 2023):

I just tested the v1.18 preview build, and it seems to do exactly what I need. It's like you read my mind! Keep up the excellent work, everybody.

@sparkchaser commented on GitHub (May 27, 2023): I just tested the v1.18 preview build, and it seems to do exactly what I need. It's like you read my mind! Keep up the excellent work, everybody.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19928