Windows terminal loose focus after 32 sec #20920

Closed
opened 2026-01-31 07:27:49 +00:00 by claunia · 7 comments
Owner

Originally created by @nitrateag on GitHub (Nov 29, 2023).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

Simply run (with Win+R shortcut) this command :

wt powershell -c pause

wait 32 sec.


yeah, 32 sec exactly... not 30 !
the focus is loose each time, and only on Windows Terminal !
if I use old blue Powershell console, he don't loose the focus
very weird ^^

it happen also with

wt powershell -c Read-Host

of course, that is a minimal example to reproduce, but that very painfull for the script I'm working on

Expected Behavior

After 32 seconds, the terminal still have the focus. Hit ENTER stop the pause

Actual Behavior

After 32 seconds, the terminal loose the focus. Hit ENTER do nothing because terminal don't catch the input until we click/set focus on terminal

Originally created by @nitrateag on GitHub (Nov 29, 2023). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22621.0 ### Other Software _No response_ ### Steps to reproduce Simply run (with Win+R shortcut) this command : ``` wt powershell -c pause ``` wait 32 sec. --- yeah, 32 sec exactly... not 30 ! the focus is loose each time, and only on Windows Terminal ! if I use old blue Powershell console, he don't loose the focus very weird ^^ it happen also with ``` wt powershell -c Read-Host ``` of course, that is a minimal example to reproduce, but that very painfull for the script I'm working on ### Expected Behavior After 32 seconds, the terminal still have the focus. Hit ENTER stop the pause ### Actual Behavior After 32 seconds, the terminal loose the focus. Hit ENTER do nothing because terminal don't catch the input until we click/set focus on terminal
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:27:49 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 29, 2023):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Nov 29, 2023): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Terminal window closes itself sometimes when losing focus (#9889)](https://github.com/microsoft/terminal/issues/9889), similarity score: 0.84 - [Terminal loses focus on launch (#12134)](https://github.com/microsoft/terminal/issues/12134), similarity score: 0.83 - [Terminal does not get focused properly (#14276)](https://github.com/microsoft/terminal/issues/14276), similarity score: 0.82 - [Active terminal does not get focus when window gets focus (#522)](https://github.com/microsoft/terminal/issues/522), similarity score: 0.82 - [windows terminal does not focus on input after launch (#13846)](https://github.com/microsoft/terminal/issues/13846), similarity score: 0.81 - [Weird behavior when terminal is focused (#11673)](https://github.com/microsoft/terminal/issues/11673), similarity score: 0.80 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@nitrateag commented on GitHub (Nov 29, 2023):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

sorry gentle bot, but my case is little different : Terminal have the focus when open, but loose it after 32 sec...
In example you show me they don't have the focus at start. And I don't use WSL.

@nitrateag commented on GitHub (Nov 29, 2023): > Hi I'm an AI powered bot that finds similar issues based off the issue title. > > Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! > > ### Closed similar issues: > * [Terminal window closes itself sometimes when losing focus (#9889)](https://github.com/microsoft/terminal/issues/9889), similarity score: 0.84 > * [Terminal loses focus on launch (#12134)](https://github.com/microsoft/terminal/issues/12134), similarity score: 0.83 > * [Terminal does not get focused properly (#14276)](https://github.com/microsoft/terminal/issues/14276), similarity score: 0.82 > * [Active terminal does not get focus when window gets focus (#522)](https://github.com/microsoft/terminal/issues/522), similarity score: 0.82 > * [windows terminal does not focus on input after launch (#13846)](https://github.com/microsoft/terminal/issues/13846), similarity score: 0.81 > * [Weird behavior when terminal is focused (#11673)](https://github.com/microsoft/terminal/issues/11673), similarity score: 0.80 > > > Note: You can give me feedback by thumbs upping or thumbs downing this comment. sorry gentle bot, but my case is little different : Terminal have the focus when open, but loose it after 32 sec... In example you show me they don't have the focus at start. And I don't use WSL.
Author
Owner

@nitrateag commented on GitHub (Nov 29, 2023):

But like #13846 , A simple :

  1. Win+R
  2. Type wt.exe, Enter
  3. wait 32 sec
    reproduce also my issue, but not at terminal launch !
@nitrateag commented on GitHub (Nov 29, 2023): But like #13846 , A simple : 1. Win+R 2. Type ```wt.exe```, Enter 3. wait 32 sec reproduce also my issue, but not at terminal launch !
Author
Owner

@zadjii-msft commented on GitHub (Nov 29, 2023):

Do you have something like BeyondSoft or CyberArk or anything like that/? Does this repro any time you open a new tab once the Terminal is already running?

What you're describing is highly similar to reports over in #13388

@zadjii-msft commented on GitHub (Nov 29, 2023): Do you have something like BeyondSoft or CyberArk or anything like that/? Does this repro any time you open a new tab once the Terminal is already running? What you're describing is highly similar to reports over in #13388
Author
Owner

@nitrateag commented on GitHub (Nov 30, 2023):

Do you have something like BeyondSoft or CyberArk or anything like that/? Does this repro any time you open a new tab once the Terminal is already running?

What you're describing is highly similar to reports over in #13388

Hi Zadjii,
You have right, BeyondTrust is integrated into my work environment as an identity and privilege manager.
I've tried using admin rights, but the focus problem persists.

As in the case of #13388, creating a new tab makes me lose focus, but only after 32sec.

@nitrateag commented on GitHub (Nov 30, 2023): > Do you have something like BeyondSoft or CyberArk or anything like that/? Does this repro any time you open a new tab once the Terminal is already running? > > What you're describing is highly similar to reports over in #13388 Hi Zadjii, You have right, BeyondTrust is integrated into my work environment as an identity and privilege manager. I've tried using admin rights, but the focus problem persists. As in the case of #13388, creating a new tab makes me lose focus, but only after 32sec.
Author
Owner

@zadjii-msft commented on GitHub (Nov 30, 2023):

Welp yea, let's merge this into that other thread then. There's something wacky that BeyondTrust does that we don't fully understand. We have yet to come up with a clever fix 😕

/dup #13388

@zadjii-msft commented on GitHub (Nov 30, 2023): Welp yea, let's merge this into that other thread then. There's something wacky that BeyondTrust does that we don't fully understand. We have yet to come up with a clever fix 😕 /dup #13388
Author
Owner

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

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Nov 30, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20920