Repository navigation
feat(fleet): start a relay session on a Windows lane in the target's plugin profile - #16631
Conversation
…plugin profile One PowerShell script on stdin to powershell.exe -Command - finds profiles.mjs through claude.exe plugin list --json, runs launch --unattended --json, removes each variable argv names after -u, and starts claude.exe with the rest of argv. The relay's own settings go to --with as a file, since Windows PowerShell 5.1 strips the quotes from a JSON argument. Closes #16605 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmchG8Tg8XKYxMrgKKq
|
Owner: the session plugin-profiles-build-6, working for the control-hub session "Plugin Presets". Ready steps: branch current with main (head ffb28e3); code and security review left to their CI lanes (both healthy); tests run locally (eval-suite validator exit 0, pre-push check-affected passed, the Windows script's parts run on a real Windows lane as the body records). Review findings go through Plugin Presets. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffb28e3dbc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…at the PowerShell pages Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmchG8Tg8XKYxMrgKKq
|
claude-security-review reviewed Security review (incremental): PR #16631,
|
|
claude-review reviewed Code review: incremental pass on #16631 (closes #16605), blocking findings onlyThis lane already reviewed an earlier head ( Result: no blocking findings. What changed since
Earlier findings
Closing issue #16605
Inputs
I reviewed without subagents, so no verifier ran. Verifier dropped 0 of 0 candidates. |
… its guards in evals Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmchG8Tg8XKYxMrgKKq
Lane run report
Failed GitHub API calls
|
Closes #16605
Summary
A session the fleet relay starts on a Windows lane (R1, R3, R6) can now start in the target's plugin profile. #16601 covered WSL lanes and left Windows lanes out because
profiles.mjs launchprints a POSIXenv -u … claudeline.Fix
plugins/fleet/skills/reach/reference/relay.md, "Start in the target's plugin profile", new subsection "On a Windows lane (R1, R3, R6)". One PowerShell script goes on stdin, as a quoted heredoc, topowershell.exe -NoProfile -Command -from<win-dir>. Only PowerShell parses it. The prompt stays out of it: a first call writes it to a file, which the script feeds toclaude.exe(see Review round 2). The script follows the machine-health wrapper's pattern (plugins/machine-health/skills/setup/templates/monthly-run.ps1, #16590):profiles.mjsthroughclaude.exe plugin list --json, taking the enabledplugin-profiles@entry'sinstallPath.node …/scripts/profiles.mjs launch <profile> --folder $PWD.Path --unattended --json --with <settings file>.argv: each name after-uis removed withRemove-Item Env:(noenv), and the words afterclaudego toclaude.exewith the verb's arguments.The relay's own settings go to
--withas a file. Windows PowerShell 5.1 strips the inner double quotes from a JSON argument to a native program: on R1,'{"crossSessionInbound":"accept"}'reachednodeas{crossSessionInbound:accept}. The section points at about_PowerShell_exe: -Command, read live this session, which says stdin input "is parsed and executed one statement at a time". A new eval case,reach-start-in-profile-windows, covers the Windows profile path.Done-when, item by item:
profiles.mjson the target, runslaunch … --unattended --json, clears the variablesargvnames withoutenv, and startsclaude.exewith the remaining arguments.node) on the target, a Windows start behaves as today and prints that the profile was not applied.reach-start-in-profile-windows.Not delivered
-pstart needs a sign-in. The section and the Verified-behavior row say the route is untested on a live hop.noderesolves in that session's Windows environment is not checked; with nonode, the script starts without the profile and says so.Review round 2
<win-dir>/relay-prompt-<name>.txt, quoted as the WSL rows quote a prompt.claude.exethroughStart-Process, with each argument quoted byQ(the Microsoft C runtime's argument rules, which the section points at). A-pprompt arrives on stdin through-RedirectStandardInput; a--bgprompt arrives as oneQ-quoted argument, sinceclaude.exe --help(2.1.325) shows no stdin or file prompt for a background start.PSending the heredoc, and a blank line ending the-Command -input.Invoke-Expression "'a’ + ’b'"returnedab.printf … >andcd <win-dir> && …powershell.exe -NoProfile -Command - <<'PS') in place of "drop the ssh part".says-profile-not-appliedlaunch-refusal-stopsprompt-from-fileno-prompt-in-script(fails a literal prompt piped to$claude)Verification
Live on R1 (melo-lap-001's Windows lane; Windows PowerShell 5.1; Claude Code 2.1.325; no agent started):
-Command -ran the heredoc script.claude.exe plugin list --jsonparsed 186 plugins, none of themplugin-profiles@, so the not-installed branch startedclaude.exe --settings <file> --version.--dry-runlaunch through Windowsnode, of this branch'sprofiles.mjson the\\wsl.localhostpath, exited 0. Walking itsargvleftclaude --settings C:\…\sessions\…json, andRemove-Item Env:clearedPLUGIN_PROFILES_SESSION.claude.exeandprofiles.mjs.plugin-profiles@x, enabled:ConvertFrom-Json | Where-Object, the filter matched nothing.(… | ConvertFrom-Json) | Where-Object, it matched theplugin-profiles@xentry.array-enumerated-before-filterfails the old form.',’,"," --version ", a blank line and a linePS(SHA-256cc82aea7…):nodestanding in forclaude.exe,Start-Process -RedirectStandardInputdelivered stdin with the same SHA-256 and length.--bgform's last argument, quoted byQ, had the same SHA-256, and" --version "stayed inside it.--settings 'C:\a b\f.json'arrived as two arguments.--versionin place of-p -n <name>) printed the not-applied line, startedclaude.exefrom the file (exit 0) and removed the file.scripts/check-as-of-recheck.sh --checkexits 0.Offline checks:
validate-cases.py plugins/fleet/evals: exit 0, no FAIL. Every grader in the new case accepts its pass samples and rejects its fail samples.check-affectedhook's portability check for a\bin\.local\bin\; the paths now use forward slashes.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmchG8Tg8XKYxMrgKKq