microsoft / microsoft/terminal
Agent working in background opens new terminal tab and steals focus
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.24.11911.0
### Windows build number
10.0.26200.0
### Other Software
GitHub Copilot CLI v1.0.85
### Steps to reproduce
Let agent do some work that results in it running a command that at some point opens a new terminal tab while you're doing something else in a different program.
### Expected Behavior
If whatever AI agent is doing in the background involves opening a new Terminal tab, the Terminal should stay in the background and not disrupt my work.
### Actual Behavior
Whenever a new Terminal tab is open by agent working in the background, the whole Terminal window is brought up to the foreground and steals focus from whatever I was doing at the time.
Note: I think agents should not normally open new terminal tabs for running commands, and they usually don't, but sometimes it just happens, possibly as a result of ignoring instructions and executing something with `cmd /c` but it's beside of the scope of this issue. If they do any stupid things, they should be let to deal with it :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior on Windows Terminal 1.24.11911.0 with GitHub Copilot CLI v1.0.85 while another application has focus. Trace the tab-opening path and focus changes; done means a tab opened by background agent work leaves Terminal in the background and does not steal focus.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100