Skip to content

Support profile-scoped WSL ACP agent backends - #481

Merged
Yuandi (DDKinger) merged 9 commits into
mainfrom
dev/DDKinger/wsl-agent-profile-backend
Jul 24, 2026
Merged

Support profile-scoped WSL ACP agent backends#481
Yuandi (DDKinger) merged 9 commits into
mainfrom
dev/DDKinger/wsl-agent-profile-backend

Conversation

@DDKinger

@DDKinger Yuandi (DDKinger) commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an inheritable Agent pane agent setting to each profile, listing all installed and policy-allowed Windows agents plus agents found in that profile's own WSL distro.
  • Run selected ACP servers and terminal tools inside WSL through the existing helper/master architecture, with source-aware process pooling, native Linux executable checks, and absolute POSIX cwd normalization.
  • Isolate WSL source-discovery probes from the agent ConPTY so wsl.exe cannot corrupt arrow-key input in the /agent picker.
  • Retry bounded WSL source probes after cold-start timeouts so a stopped distro is not misreported as an uninstalled agent.
  • Preserve the existing Windows-hosted global agent when a profile is unconfigured; explicit profile selections are strict and surface startup failures without switching to another agent.
  • Keep /agent source-aware and scoped to the active Windows host/current WSL distro, including GPO enforcement and session-location propagation.
image image

Settings behavior

  • Missing or empty agentPaneBackend keeps current behavior and uses the global Windows agent.
  • Profile values use host:<agent-id> or wsl:<distro>:<agent-id>.
  • The current global Windows agent appears once in the picker; other installed host agents and current-distro agents appear as distinct options.
  • Profile selections take precedence over the global Agent pane selection and never fall back to a different agent.
  • Changing a profile backend rebuilds only tabs bound to that profile; unrelated tabs and the shared master remain running.

Validation

  • WTA full test suite passed.
  • Explicit-target WTA Debug build succeeded (x86_64-pc-windows-msvc).
  • TerminalSettingsEditor, TerminalApp, TerminalControl, and CascadiaPackage Debug builds succeeded.
  • Focused ProfileTests::AgentPaneBackendDefaultsAndInherits TAEF test passed.
  • Debug package deployed and manually exercised with the profile Agent pane agent picker.

Closes #349, #302

Preserve the Windows-hosted global agent as the default and fallback while allowing profiles to select agents installed in their own WSL distro.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Render AgentEntry labels with x:Bind and generate one logical option per host or WSL backend while preserving global inheritance.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 06:16

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

Adds per-profile selection of an ACP agent pane “backend” (Windows host vs a specific profile’s WSL distro) while preserving the existing Windows-hosted global agent as the default and as a fallback when an in-distro backend can’t start. This extends the helper/master architecture to spawn ACP agents and related terminal tooling inside WSL, and surfaces the resolved backend in UI/metadata.

Changes:

  • Introduces agentPaneBackend as an inheritable profile setting + schema support, plus Settings UI to pick between host agents and the profile’s WSL distro agents.
  • Adds WSL-aware backend plumbing in WTA (agent source model, WSL executable probing, WSL spawning, cwd normalization, and fallback signaling).
  • Updates agent pane UI/status to display backend and adds localized non-blocking fallback notice text.

Reviewed changes

Copilot reviewed 136 out of 136 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/wta/src/ui/setup.rs Shows “Select agent” title for the new setup option entry.
tools/wta/src/ui/layout.rs Renders an agent popup overlay when present.
tools/wta/src/ui/agent_popup.rs Marks “current agent” using both agent id and source.
tools/wta/src/slash_command_tests.rs Extends switch-agent event tests to include source + distro fields.
tools/wta/src/shell/shell_manager.rs Adds AgentSource to wrap tool launches via wsl.exe for WSL-backed tabs; improves Windows cmdline quoting.
tools/wta/src/session_registry.rs Carries agent source + fallback metadata through ACP _meta.wta.
tools/wta/src/protocol/acp/spawn.rs Adds WSL agent process spawning and robust shell-quoting launch script.
tools/wta/src/protocol/acp/client.rs Plumbs agent source/cwd into helper↔master init and uses resolved backend metadata to configure tool launching + UI events.
tools/wta/src/master/mod.rs Pools agent CLIs by (source, command), resolves requested backend with trusted host fallback, and reports session location.
tools/wta/src/main.rs Adds hidden CLI flags for per-tab backend selection and a probe-agent-sources command for Settings UI.
tools/wta/src/cli_tests.rs Adds CLI parsing tests for per-tab source flags and updates WSL probe-script tests.
tools/wta/src/agent_source.rs New: agent execution source model + WSL cwd normalization and home resolution.
tools/wta/src/agent_check.rs Adds WSL-native executable probing and source-aware agent checks.
tools/wta/locales/af-ZA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/am-ET.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ar-SA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/as-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/az-Latn-AZ.yml Adds system.agent_source_fallback localization.
tools/wta/locales/bg-BG.yml Adds system.agent_source_fallback localization.
tools/wta/locales/bn-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/bs-Latn-BA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ca-ES.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ca-Es-VALENCIA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/cs-CZ.yml Adds system.agent_source_fallback localization.
tools/wta/locales/cy-GB.yml Adds system.agent_source_fallback localization.
tools/wta/locales/da-DK.yml Adds system.agent_source_fallback localization.
tools/wta/locales/de-DE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/el-GR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/en-US.yml Adds system.agent_source_fallback string + comment.
tools/wta/locales/en-GB.yml Adds system.agent_source_fallback localization.
tools/wta/locales/es-ES.yml Adds system.agent_source_fallback localization.
tools/wta/locales/es-MX.yml Adds system.agent_source_fallback localization.
tools/wta/locales/et-EE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/eu-ES.yml Adds system.agent_source_fallback localization.
tools/wta/locales/fa-IR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/fi-FI.yml Adds system.agent_source_fallback localization.
tools/wta/locales/fil-PH.yml Adds system.agent_source_fallback localization.
tools/wta/locales/fr-FR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/fr-CA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ga-IE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/gd-gb.yml Adds system.agent_source_fallback localization.
tools/wta/locales/gl-ES.yml Adds system.agent_source_fallback localization.
tools/wta/locales/gu-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/he-IL.yml Adds system.agent_source_fallback localization.
tools/wta/locales/hi-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/hr-HR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/hu-HU.yml Adds system.agent_source_fallback localization.
tools/wta/locales/hy-AM.yml Adds system.agent_source_fallback localization.
tools/wta/locales/id-ID.yml Adds system.agent_source_fallback localization.
tools/wta/locales/is-IS.yml Adds system.agent_source_fallback localization.
tools/wta/locales/it-IT.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ja-JP.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ka-GE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/kk-KZ.yml Adds system.agent_source_fallback localization.
tools/wta/locales/km-KH.yml Adds system.agent_source_fallback localization.
tools/wta/locales/kn-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ko-KR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/kok-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/lb-LU.yml Adds system.agent_source_fallback localization.
tools/wta/locales/lo-LA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/lt-LT.yml Adds system.agent_source_fallback localization.
tools/wta/locales/lv-LV.yml Adds system.agent_source_fallback localization.
tools/wta/locales/mi-NZ.yml Adds system.agent_source_fallback localization.
tools/wta/locales/mk-MK.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ml-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/mr-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ms-MY.yml Adds system.agent_source_fallback localization.
tools/wta/locales/mt-MT.yml Adds system.agent_source_fallback localization.
tools/wta/locales/nb-NO.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ne-NP.yml Adds system.agent_source_fallback localization.
tools/wta/locales/nl-NL.yml Adds system.agent_source_fallback localization.
tools/wta/locales/nn-NO.yml Adds system.agent_source_fallback localization.
tools/wta/locales/or-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/pa-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/pl-PL.yml Adds system.agent_source_fallback localization.
tools/wta/locales/pt-BR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/pt-PT.yml Adds system.agent_source_fallback localization.
tools/wta/locales/qps-ploc.yml Adds system.agent_source_fallback localization.
tools/wta/locales/qps-ploca.yml Adds system.agent_source_fallback localization.
tools/wta/locales/qps-plocm.yml Adds system.agent_source_fallback localization.
tools/wta/locales/quz-PE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ro-RO.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ru-RU.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sk-SK.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sl-SI.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sq-AL.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sr-Cyrl-BA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sr-Cyrl-RS.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sr-Latn-RS.yml Adds system.agent_source_fallback localization.
tools/wta/locales/sv-SE.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ta-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/te-IN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/th-TH.yml Adds system.agent_source_fallback localization.
tools/wta/locales/tr-TR.yml Adds system.agent_source_fallback localization.
tools/wta/locales/tt-RU.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ug-CN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/uk-UA.yml Adds system.agent_source_fallback localization.
tools/wta/locales/ur-PK.yml Adds system.agent_source_fallback localization.
tools/wta/locales/uz-Latn-UZ.yml Adds system.agent_source_fallback localization.
tools/wta/locales/vi-VN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/zh-CN.yml Adds system.agent_source_fallback localization.
tools/wta/locales/zh-TW.yml Adds system.agent_source_fallback localization.
src/cascadia/UnitTests_SettingsModel/ProfileTests.cpp Adds a unit test for backend defaulting/inheritance and parsing.
src/cascadia/TerminalSettingsModel/Profile.idl Adds inheritable AgentPaneBackend to the profile model.
src/cascadia/TerminalSettingsModel/MTSMSettings.h Adds agentPaneBackend to the settings macro list.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw Adds UI strings for profile “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/de-DE/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/es-ES/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/fr-FR/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/it-IT/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/ko-KR/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/pt-BR/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/qps-ploc/Resources.resw Adds pseudo-locale UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/qps-ploca/Resources.resw Adds pseudo-locale UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/qps-plocm/Resources.resw Adds pseudo-locale UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/ru-RU/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/sr-Cyrl-RS/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/uk-UA/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/zh-CN/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/Resources/zh-TW/Resources.resw Adds localized UI strings for “Agent pane backend”.
src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl Exposes backend list + selected backend to Settings UI.
src/cascadia/TerminalSettingsEditor/ProfileViewModel.h Adds members/methods for backend list and async WSL probing.
src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp Builds host/WSL backend option list and probes WSL-installed agents via WTA.
src/cascadia/TerminalSettingsEditor/Profiles_Base.xaml Adds the backend ComboBox to the profile “General” page.
src/cascadia/TerminalApp/TerminalPage.h Expands agent settings snapshot to include per-profile backends.
src/cascadia/TerminalApp/TerminalPage.cpp Applies profile backend selection, enforces active-pane WSL compatibility, passes source args to helper, and forwards backend status to UI.
src/cascadia/TerminalApp/Tab.h Stores per-tab override source + WSL distro for /agent switches.
src/cascadia/TerminalApp/AgentPaneContent.idl Extends status update API to include backend string.
src/cascadia/TerminalApp/AgentPaneContent.h Stores backend and includes it in status updates.
src/cascadia/TerminalApp/AgentPaneContent.cpp Renders backend in the agent pane header.
src/cascadia/inc/WslShellIntegration.h Adds ResolveDistroName helper for WSL profile command lines.
src/cascadia/inc/AgentPaneBackend.h New: parser/format helpers for host:<id> and wsl:<distro>:<id>.
README.md Documents per-tab /agent behavior and per-profile backend setting with fallback.
doc/cascadia/profiles.schema.json Adds agentPaneBackend to the profile schema with validation pattern.

Comment thread src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp
Comment thread tools/wta/src/agent_source.rs
Comment thread tools/wta/src/protocol/acp/spawn.rs Fixed
@github-actions

This comment has been minimized.

Keep the global Windows agent only as the unconfigured default. Explicit profile selections now fail in place instead of falling back, and the setting is labeled Agent pane agent.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 08:40

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

Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.

Comment thread src/cascadia/TerminalApp/TerminalPage.cpp
Comment thread tools/wta/src/app.rs Outdated
@github-actions

This comment has been minimized.

Launch source-discovery wsl.exe probes without a console so they cannot corrupt crossterm arrow-key input in the agent pane.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 12:21
@github-actions

This comment has been minimized.

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

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Comment thread src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp
Retry the bounded command lookup with a fresh wsl.exe process so the first attempt can wake a stopped distro without being misreported as an uninstalled agent.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 12:41
@github-actions

This comment has been minimized.

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

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Comment thread tools/wta/src/agent_source.rs
Generate the Agent pane agent header and profile precedence description with the repository pseudo-localization mapping for all qps locales.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 13:06
@github-actions

This comment has been minimized.

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

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

tools/wta/src/app.rs:2881

  • /agent <arg> still tries to match by display_name, but host entries now append a " — Windows" suffix. This makes previously-valid inputs like /agent GitHub Copilot stop matching (you’d have to include the suffix). Consider also matching against the pre-suffix portion so direct switching remains ergonomic.

Comment thread src/cascadia/TerminalApp/TerminalPage.cpp
Handle global-host aliases, WSL UNC roots, ConPTY-safe home probes, base agent display names, and the Bash norc spelling expectation.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 23, 2026 13:41

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

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

Track the stable source profile across helper recreation and tab moves, include profile defaults in backend snapshots, and avoid reopening unaffected active tabs.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 24, 2026 03:06

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

Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.

Comment thread tools/wta/src/protocol/acp/spawn.rs Outdated
Spawn wsl.exe with CREATE_NO_WINDOW so ACP agents cannot attach to a console, corrupt input modes, or flash a window in diagnostic master launches.

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

Copilot-Session: 4ea5b4d6-de06-4331-93dc-3b45561a1a53
Copilot AI review requested due to automatic review settings July 24, 2026 03:23

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

Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.

Comment on lines +361 to +366
std::wstring escapedDistro{ distro };
for (size_t pos = 0; (pos = escapedDistro.find(L'"', pos)) != std::wstring::npos; pos += 2)
{
escapedDistro.replace(pos, 1, L"\"\"");
}
const auto args = L"probe-agent-sources --wsl-distro \"" + escapedDistro + L"\"";
@DDKinger
Yuandi (DDKinger) merged commit 680f605 into main Jul 24, 2026
11 checks passed
Yuandi (DDKinger) added a commit that referenced this pull request Aug 3, 2026
Add Feature.DelegateSource.Tests.ps1 (mirrors #481's Feature.WslAgentBackend):
a profile's Command palette agent selects an exact delegate execution source,
so `wta delegate` always receives an explicit --delegate-source and never
re-routes itself.

- An explicit --delegate-source wsl selection never falls back to the Windows
  host when the agent is missing in that distro (regression positive for the
  removed wsl_agent_available==false fallback).
- The default/host source is never diverted to WSL even when a runnable distro
  is present (guards the removed active-pane WSL inference).

TerminalPage.cpp's profile resolution is only reachable via non-injectable UI
(Alt+Shift+B / Alt+Shift+/ / ?<prompt>), so — exactly like Feature.Delegate —
these cases drive the delegate engine directly with the flags it now passes.

Validated live against a freshly built #488 wta.exe; case 1 reproduces the
pre-fix failure when run against a wta.exe built from main.

Track C244 (picker UI, stays manual like C237) and C245 (routing strictness,
mapped to this suite in release-coverage-map.psd1). IDs via Set-ChecklistIds.ps1.

Based on the unmerged #488 head 528251a.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 02129b5b-f6fb-46e0-ab80-c2b9d6798f89
Yuandi (DDKinger) added a commit that referenced this pull request Aug 4, 2026
Add Feature.DelegateSource.Tests.ps1 (mirrors #481's Feature.WslAgentBackend):
a profile's Command palette agent selects an exact delegate execution source,
so `wta delegate` always receives an explicit --delegate-source and never
re-routes itself.

- An explicit --delegate-source wsl selection never falls back to the Windows
  host when the agent is missing in that distro (regression positive for the
  removed wsl_agent_available==false fallback).
- The default/host source is never diverted to WSL even when a runnable distro
  is present (guards the removed active-pane WSL inference).

TerminalPage.cpp's profile resolution is only reachable via non-injectable UI
(Alt+Shift+B / Alt+Shift+/ / ?<prompt>), so — exactly like Feature.Delegate —
these cases drive the delegate engine directly with the flags it now passes.

Validated live against a freshly built #488 wta.exe; case 1 reproduces the
pre-fix failure when run against a wta.exe built from main.

Track C244 (picker UI, stays manual like C237) and C245 (routing strictness,
mapped to this suite in release-coverage-map.psd1). IDs via Set-ChecklistIds.ps1.

Based on the unmerged #488 head 528251a.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 02129b5b-f6fb-46e0-ab80-c2b9d6798f89
Yuandi (DDKinger) added a commit that referenced this pull request Aug 4, 2026
…#537)

Add Feature.DelegateSource.Tests.ps1 (mirrors #481's Feature.WslAgentBackend):
a profile's Command palette agent selects an exact delegate execution source,
so `wta delegate` always receives an explicit --delegate-source and never
re-routes itself.

- An explicit --delegate-source wsl selection never falls back to the Windows
  host when the agent is missing in that distro (regression positive for the
  removed wsl_agent_available==false fallback).
- The default/host source is never diverted to WSL even when a runnable distro
  is present (guards the removed active-pane WSL inference).

TerminalPage.cpp's profile resolution is only reachable via non-injectable UI
(Alt+Shift+B / Alt+Shift+/ / ?<prompt>), so — exactly like Feature.Delegate —
these cases drive the delegate engine directly with the flags it now passes.

Validated live against a freshly built #488 wta.exe; case 1 reproduces the
pre-fix failure when run against a wta.exe built from main.

Track C244 (picker UI, stays manual like C237) and C245 (routing strictness,
mapped to this suite in release-coverage-map.psd1). IDs via Set-ChecklistIds.ps1.

Based on the unmerged #488 head 528251a.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 02129b5b-f6fb-46e0-ab80-c2b9d6798f89
@DDKinger
Yuandi (DDKinger) deleted the dev/DDKinger/wsl-agent-profile-backend branch August 9, 2026 08:58
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.

Support ACP agents running inside WSL as an agent-pane backend (Copilot/OpenCode/CodeX)

4 participants