Issue with Open windows from a previous session & WSL #18648

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

Originally created by @Stanzilla on GitHub (Oct 10, 2022).

Windows Terminal version

1.16.2642.0

Windows build number

10.0.22623.0

Other Software

WSL v2

Steps to reproduce

  • Have a few tabs open that point to paths on the WSL VM
  • Restart your PC
  • Open Windows Terminal

Expected Behavior

Tabs restored to their previous folder / path

Actual Behavior

Tabs restored to system32

I assume this happened because the VM was not running yet when I launched Terminal? Is there maybe a way to let terminal "wait" for it to be up and then restore the correct path?

Originally created by @Stanzilla on GitHub (Oct 10, 2022). ### Windows Terminal version 1.16.2642.0 ### Windows build number 10.0.22623.0 ### Other Software WSL v2 ### Steps to reproduce - Have a few tabs open that point to paths on the WSL VM - Restart your PC - Open Windows Terminal ### Expected Behavior Tabs restored to their previous folder / path ### Actual Behavior Tabs restored to system32 I assume this happened because the VM was not running yet when I launched Terminal? Is there maybe a way to let terminal "wait" for it to be up and then restore the correct path?
claunia added the Issue-BugNeeds-Tag-FixNeeds-AttentionProduct-Terminal labels 2026-01-31 06:20:14 +00:00
Author
Owner

@lhecker commented on GitHub (Oct 12, 2022):

Hey! Did you configure your shell to emit OSC 9;9 sequences to inform the terminal about the shell's working directory?

@lhecker commented on GitHub (Oct 12, 2022): Hey! Did you configure your shell to emit OSC 9;9 sequences to inform the terminal about the shell's working directory?
Author
Owner

@Stanzilla commented on GitHub (Oct 12, 2022):

I did not know that I have to do that, will try now, thank you!

@Stanzilla commented on GitHub (Oct 12, 2022): I did not know that I have to do that, will try now, thank you!
Author
Owner

@Stanzilla commented on GitHub (Oct 14, 2022):

Yup, that fixes it!

@Stanzilla commented on GitHub (Oct 14, 2022): Yup, that fixes it!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18648