Repository navigation
The Claude Code and Codex plugins work on Windows and on macOS symlinked checkouts, checked by a real session per platform in CI - #313
Merged
Conversation
9 tasks done
zlareb1
force-pushed
the
ci/plugin-platforms
branch
4 times, most recently
from
November 7, 2026 14:11
9c0c29c to
0c8206c
Compare
…ked checkouts, checked by a real session per platform in CI Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… too Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… ..name test; the helper's LOOM_NODE fallback is tested Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…order Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…e line shows; PowerShell calls are captured as command runs Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…gain; the Windows pipe test names the exit code it covers Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…d; the contract runs payloads without a cwd in the sandbox The malformed-payload contract cases have no cwd, so SessionStart worked in the suite's own checkout, whose git calls took a loaded Windows arm64 runner past the 8 s bound. They now run in the sandbox home. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…a Windows flusher cannot hold open for removal Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… git's timeout Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…'s launcher fallback after a PATH node that cannot run it is tested Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…pattern; the test gate reads PowerShell commands - JWT_RE is built from the header and payload limits redactJwts checks, and the equality test uses the exported pattern. - sessionScope reads the paths a PowerShell command names, as for Bash. - gitBashPath sits above parseBashBulkSegments' doc comment; the e2e says what an exit 0 means under PowerShell. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… page's helper override equal to the shipped one Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ath, as it does a cd target Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… case-insensitively Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… the columns reflowed Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
ci/plugin-platforms
branch
from
November 7, 2026 14:30
16f5d99 to
475fb07
Compare
…launcher: no node on PATH, one older than 18, or no installed copy Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…U time, since process CPU counts V8's compiler threads A WSL run measured 50.3 ms of process CPU in a run whose wall time was 33.6 ms. The main thread's time is at most both clocks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
marked this pull request as ready for review
November 7, 2026 15:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The Claude Code and Codex plugins now work on Windows (x86_64 and arm64, with or without Git Bash) and on macOS checkouts reached through a symlink; a CI workflow runs the plugin suite and a real Claude Code and Codex session on Linux, Alpine, macOS and Windows.
Why
The plugin suite ran on Linux only, and no test ever started a real agent with the plugin installed. Run on every platform, it found these:
http_headers_helperwithcmd.exe /C, which cannot run the POSIX commandnode -e, whichcmd.exeandshboth run;shfalls back to the launcherheadersHelperwithcmd.exeon Windows, with or without Git Bash (measured in CI)sh "<launcher>" … || node -e "…":shruns the launcher,cmd.exeruns node'sh' is not recognized), a failing PreToolUse can block the tool callhooks.jsoncommand reads as both anshscript (itexecs the launcher on line 2) and a PowerShell script (line 1 sets$xand opens a block comment that line 3 closes; then thenodeon PATH, unchecked for version, or oneloom:line, andexit 0)relDirtreated files in the checkout as outside it/tmpvs/private/tmp,RUNNER~1vs the long name,C:/vsC:\realPath/pathUndercompare both as the file system names them; the shunt cache is keyed the same waytouchPrivateFileset mtime through a read-only handle, which Windows refuses/pathUnderC:/…or/c/…bin/pythononly; one spelling onlyScripts\python.exe; all three spellingscd C:/Users/RUNNER~1/…stopped the Bash read parser~ended it; only/…counted as absolute~only at the word start, drive paths and Git Bash's/c/form are absolute; double-quoted backslashes kept asshkeeps themwindowsHidegrep: write error: Connection reset by peerpipestdio is a socket pair, where a reader that closed with data unread can show the writer ECONNRESET instead of EPIPE| headtest reads a real FIFOeyJ-eyJ-…tool output took 203 ms of CPU to redactJWT_REretried its 512-character header scan from everyeyJin a long runredactJwtsscans each run once and replaces exactly whatJWT_REmatches (fuzz-tested against it)src\a.c/paths\n\r?\nshscripts broken by CRLF.gitattributeskeeps*.sh,bin/loom-node, the grep shim and skills LF; the shipped scripts also change by one comment line, so a clone that already holds CRLF copies gets LF on its next pullThe rest were test assumptions that do not hold off Linux (HOME/TMPDIR without USERPROFILE/TEMP/SystemRoot, mode-bit asserts on NTFS,
/literals,/usr/bin/mktemp, ESM imports ofD:\paths) and four timing tests that measured the runner under load: the redaction check now compares equal bytes at 10 KB and 80 KB in CPU time (linearity), run until both sides span many ticks of Windows' coarse CPU clock, and holds one first 80 KB run to 200 ms; the shunt accounting holds one run to 50 ms (each single cold run takes the lesser of wall and process CPU time, since process CPU also counts V8's compiler threads); the hanging-server contract sets the shunt's own lookup bound to its 1000 ms floor, and its payloads without acwdrun in the temp directory rather than the suite's own large checkout; the Stop-gate and edit-hook hanging-server tests time from the hook's request to its exit (request bound plus exit grace, under 1.5 s) and are run again only when a run spent git's 1.5 s timeout without asking (a loaded runner), with a 7 s backstop on the whole run (about twice the slowest seen, macOS Intel under load; a wall-clock bound on the part before the request would measure the runner, which is what failed there); the SessionEnd budget test's fake begin answers in 200 ms instead of 350 ms, inside its 400 ms cap.Scope and risk
Hooks run in the user's session. The PowerShell branch of a hook command exits 0 always, so a missing Node cannot block a tool call; every hook script already exits 0. On macOS and Linux each hook still
execsbin/loom-nodeas before; the new first line only sets$1. The Claude Code header helper still tries the launcher first, soLOOM_NODEkeeps its precedence; aLOOM_NODEthat is not Node 18+ fails the hooks as before, and the helper then tries thenodeon PATH. In pass-through mode (no token) the grep shim hands its stdout to native grep, which reports a socket reader's early close itself, as it does without the shim. The project name is taken from the toplevel as git prints it, so no project changes namespace. Out of scope, noted for a follow-up: Claude Code runs a plugin'sheadersHelperfrom the plugin root, so theX-Loom-Code-Scopethe helper derives from its working directory does not name the project's checkout: #337. Known and left: theloom-statusskill runs its checks withsh, so on Windows without Git Bash it cannot run them; changing a shipped skill needs a paidclaude plugin evalrun, so the claude-code page gives that case's command instead (node <plugin root>/bin/loom-client-status.mjs). The one line this PR adds to the skill'sensure-node.shis a comment that forces an LF rewrite; it changes no prompt text, so no eval run is needed for it. Undercmd.exewith Git'sshonPATH, the Claude Code helper'sshhalf fails on the unexpanded$CLAUDE_PLUGIN_ROOTand may leave one line on stderr beforenode -eanswers; the token still arrives (the Windows e2e asserts it).Compatibility, rollout and rollback
Tests
.github/workflows/plugin-platforms.yml(on changes underintegrations/) runs the plugin and grep-shim suites, thentests/e2e/agent-session.mjsfor each agent:claude plugin install/codex plugin addfrom the checkout into a scratch home, then one headless turn (claude -p,codex exec) against a local fake that answers the model API and Loom, so no provider is called. The work directory is a git checkout in the platform's temp directory (/private/varon macOS, an 8.3 path on Windows), so the hooks resolve a checkout root there, and the e2e asserts they looked up its remote (example/e2e); the no-Git-Bash step has no git, so it runs outside a checkout, and its PowerShell tool matches no PreToolUse hook (the unit tests run the PowerShell form itself). For both agents it asserts the MCP header helper sent the token and each event's own Loom call arrived with it (SessionStart: the startupcontext.pack; UserPromptSubmit:run.begin; PostToolUse:observe.record; Stop:conversation.appendfor Codex,cost.record_turnsfor Claude Code, whose conversation hook also runs at SessionEnd). For Claude Code, which reports its hook results, it also asserts every hook that ran exited 0 with nothing on stderr, that SessionStart's primer reached it, and the turn's shell tool (--expect-tool: Bash, or PowerShell in the no-Git-Bash step, which proves that step took the PowerShell path). With--node-off-pathit asserts the hooks ran the Node it placed only under nvm.Matrix: ubuntu-latest, ubuntu-24.04-arm, Alpine (musl, BusyBox
sh), WSL 2 (Ubuntu 24.04, Node 18), macos-latest (arm64), macos-15-intel, windows-latest, windows-11-arm; on the Ubuntu and macOS runners also withnodeoff the agent's PATH (GUI launch), on Windows also without Git Bash. Run at the final head: https://github.com/ClickHouse/loom/actions/runs/42383647107. Locally: Debiandashand Alpine containers on arm64.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. Every platform claim is from a CI job or container run on that platform.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
agent_plugin_sync.py).docs/describe the platforms and the Windows Node rule.🤖 Generated with Claude Code