Skip to content

Run Agents App in transient mode when VS Code is launched with --transient#312693

Merged
sandy081 merged 2 commits intomainfrom
agents/vs-code-transient-mode-setup
Apr 27, 2026
Merged

Run Agents App in transient mode when VS Code is launched with --transient#312693
sandy081 merged 2 commits intomainfrom
agents/vs-code-transient-mode-setup

Conversation

@sandy081
Copy link
Copy Markdown
Member

Summary

When VS Code is launched with --transient, the Agents App now also runs in transient mode with its own dedicated temporary user data and extensions directories, created under the same temp parent folder.

Changes

  • argv.ts (common + node): Add --agents-user-data-dir and --agents-extensions-dir CLI args
  • cli.ts: In the --transient block, create agents-data/ and agents-extensions/ subdirs alongside the existing temp dirs, pass them via the new args, and include them in the relaunch hint message
  • nativeHostMainService.ts: When launching the sibling Agents app (launchSiblingApp), forward the transient dirs as --user-data-dir and --extensions-dir so the Agents process also runs fully isolated in transient mode

…sient

When VS Code is launched with --transient, the Agents App now also runs
in transient mode with its own dedicated temporary user data and
extensions directories created under the same temp parent folder.

- Add `--agents-user-data-dir` and `--agents-extensions-dir` CLI args
- In --transient handling, create `agents-data/` and `agents-extensions/`
  subdirs alongside existing temp dirs and pass them via the new args
- In `launchSiblingApp`, forward transient agents dirs as
  `--user-data-dir` and `--extensions-dir` to the sibling Agents process

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 09:25
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering Bot commented Apr 27, 2026

📬 CODENOTIFY

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

@deepak1556

Matched files:

  • src/vs/code/node/cli.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates VS Code’s --transient launch flow so that when the Agents sibling application is launched, it can use its own transient user-data and extensions directories under the same temporary parent folder.

Changes:

  • Add new CLI args: --agents-user-data-dir and --agents-extensions-dir.
  • In --transient launches, create agents-data/ and agents-extensions/ temp subfolders and include them in the relaunch hint.
  • When launching the sibling Agents app, forward these directories as --user-data-dir and --extensions-dir.
Show a summary per file
File Description
src/vs/platform/native/electron-main/nativeHostMainService.ts Forwards agent-specific transient directories to the sibling app as --user-data-dir / --extensions-dir.
src/vs/platform/environment/node/argv.ts Registers the two new CLI args in the node argv option map.
src/vs/platform/environment/common/argv.ts Extends NativeParsedArgs with the new agent-specific directory args.
src/vs/code/node/cli.ts Generates agent-specific transient directories and includes them in argv + relaunch message under --transient.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 1

Comment thread src/vs/platform/native/electron-main/nativeHostMainService.ts
…nts app

To ensure the sibling Agents process is fully isolated in transient mode,
forward shared-data-dir and agent-plugins-dir in addition to user-data-dir
and extensions-dir.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member Author

@sandy081 sandy081 left a comment

Choose a reason for hiding this comment

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

Addressed in 08341e8. Also forwarding --shared-data-dir and --agent-plugins-dir to the sibling Agents app so all four transient dirs are propagated.

@sandy081 sandy081 enabled auto-merge (squash) April 27, 2026 10:30
@sandy081 sandy081 merged commit 696460b into main Apr 27, 2026
26 checks passed
@sandy081 sandy081 deleted the agents/vs-code-transient-mode-setup branch April 27, 2026 10:31
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone Apr 27, 2026
@sandy081 sandy081 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 27, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants