Skip to content

terminal: avoid shell integration command delay - #332981

Merged
Connor Peet (connor4312) merged 2 commits into
microsoft:mainfrom
connor4312:connor4312/277391
Aug 27, 2026
Merged

terminal: avoid shell integration command delay#332981
Connor Peet (connor4312) merged 2 commits into
microsoft:mainfrom
connor4312:connor4312/277391

Conversation

@connor4312

Copy link
Copy Markdown
Member

terminal: avoid shell integration command delay

Fix a race that delayed commands when command detection was ready before
the shell prompt entered its input state.

  • Wait for input on an existing command detection capability.
  • Continue to wait for capability registration when none exists.
  • Add a regression test for the shell integration event order.

Fixes #277391
Fixes #329895

(Commit message generated by Copilot)

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Fix a race that delayed commands when command detection was ready before
the shell prompt entered its input state.

- Wait for input on an existing command detection capability.
- Continue to wait for capability registration when none exists.
- Add a regression test for the shell integration event order.

Fixes microsoft#277391
Fixes microsoft#329895

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 27, 2026 16:55
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) August 27, 2026 16:55
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
  • src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts

@anthonykim1 Anthony Kim (anthonykim1) added this to the 1.136.0 milestone Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a shell-integration race that delayed terminal commands until timeout.

Changes:

  • Waits on existing command detection capabilities.
  • Retains capability-registration waiting when absent.
  • Adds regression coverage for OSC 633 A → command → B ordering.
Show a summary per file
File Description
terminalInstance.ts Corrects prompt-input waiting logic.
terminalInstance.test.ts Tests the fast shell initialization race.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@connor4312
Connor Peet (connor4312) merged commit 1728c40 into microsoft:main Aug 27, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terminal.integrated.shellIntegration in runCommand alway timeout 5s Delay before starting npm script in debug terminal

3 participants