microsoft / microsoft/terminal

Terminal env vars (`WT_SESSION`, etc) aren't set when set as the Default Terminal

Open
#13,006 8 comments 6 reactions 0 assignees View on GitHub
Area-DefApp Issue-Task Priority-2 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.12.10983.0

### Windows build number

10.0.22000.0

### Other Software

_No response_

### Steps to reproduce

Change settings to launch terminal instead of command shell.
Close instances of terminal
Run powershell/pwsh
Check $env:WT_PROFILE_ID
See that it is blank

### Expected Behavior

$ENV:WT_PROFILE_ID should never be blank, because having a blank profile ID disables changing settings for that profile.

### Actual Behavior

$ENV:WT_PROFILE_ID is not set when terminal is launched with pwsh/powershell, after changing system settings.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by setting Windows Terminal as the default terminal, closing existing instances, launching powershell or pwsh, and checking $env:WT_PROFILE_ID. Trace the default-terminal launch path and environment propagation; done means WT_PROFILE_ID is populated and profile settings can be changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.