Feature Request: Preserve Python Virtual Environment and Working Directory on "Duplicate Tab" #23317

Open
opened 2026-01-31 08:38:44 +00:00 by claunia · 0 comments
Owner

Originally created by @mriamnobody on GitHub (May 31, 2025).

Description of the new feature

The current "Duplicate Tab" functionality in Windows Terminal does not fully replicate the existing session. Two critical issues are observed:

  1. Working Directory Not Preserved
    When duplicating a tab, the new tab defaults to the user’s home directory (e.g., C:\Users\Username) rather than maintaining the working directory of the original tab.

Expected Behavior:
The duplicated tab should open in the same working directory as the tab it was duplicated from — this is especially important when working across deep project structures.

  1. Virtual Environment Context Not Preserved
    If a Python virtual environment (e.g., via venv or conda) is activated in the original tab, the duplicated tab does not retain this activation. It launches a plain shell session, requiring the environment to be manually reactivated.

Expected Behavior:
The new tab should inherit the activated environment context, mirroring the exact state of the original session.

This enhancement would greatly benefit developers and power users who frequently work in isolated environments and deep directory structures. Thank you for the ongoing development and great work on Windows Terminal!

Proposed technical implementation details

No response

Originally created by @mriamnobody on GitHub (May 31, 2025). ### Description of the new feature The current "Duplicate Tab" functionality in Windows Terminal does not fully replicate the existing session. Two critical issues are observed: 1. Working Directory Not Preserved When duplicating a tab, the new tab defaults to the user’s home directory (e.g., C:\Users\Username) rather than maintaining the working directory of the original tab. Expected Behavior: The duplicated tab should open in the same working directory as the tab it was duplicated from — this is especially important when working across deep project structures. 2. Virtual Environment Context Not Preserved If a Python virtual environment (e.g., via venv or conda) is activated in the original tab, the duplicated tab does not retain this activation. It launches a plain shell session, requiring the environment to be manually reactivated. Expected Behavior: The new tab should inherit the activated environment context, mirroring the exact state of the original session. This enhancement would greatly benefit developers and power users who frequently work in isolated environments and deep directory structures. Thank you for the ongoing development and great work on Windows Terminal! ### Proposed technical implementation details _No response_
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 08:38:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23317