Repository navigation
Conversation
Port the session daemon, the app's process and socket handling, and the frontend's paths and shortcut labels so Kriyon builds, runs and hosts Claude Code on Windows 10/11. - The session socket is a Unix-domain socket on both platforms; Windows gets it from uds_windows behind kriyon_core::uds. - The daemon puts its shell in a Job Object that kills on close: the Windows tree stop, and the busy signal (more than the shell in the job). It answers ConPTY's opening cursor query itself, since no terminal is attached yet. - The app spawns the daemon detached with no console, claims its run dir with an unshared lock file, reads the process table from a Toolhelp snapshot plus each process's own command line, and ends daemons with TerminateProcess. - Hooks run a real python.exe on Windows (never the Store stub), with paths Git Bash can read. The shell is PowerShell; no shell PATH probe is needed. - No menu bar off macOS; the window fits a short screen; tray accelerators use CmdOrCtrl. - Frontend: Windows-aware path helpers and Ctrl-spelled shortcut labels. - Test binaries on Windows embed the Common Controls manifest so they start. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Resolve paths with dunce (no \\?\ verbatim paths), so file watching and path comparisons match what Windows reports; clippy now bans the std canonicalize. - Close the target before the atomic rename, so saving a file works. - Write relative paths with `/` (git pathspecs, @-mention completion, nested command names). - Recognise Windows transcript paths for the main-session lock, and the Windows temp folder for handoffs and one-shot detection. - Worktree installs run through cmd and setup commands through PowerShell, with no console window; every git spawn hides its console too. - A closed client connection no longer hangs on Windows when the daemon never accepted it. - Recycle Bin delete, editor launch, memory and CPU readings, and the orphan-daemon reaper on Windows. - Claude launch commands in PowerShell syntax on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tests that drive a POSIX shell, read a terminal device or use POSIX path fixtures run on Unix only, each next to a Windows counterpart where the behaviour differs. Hook-script tests use a real Python and point USERPROFILE at the test home, which is what Windows Python reads for `~`. Shortcut labels in tests come from the platform helper. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The tray uses the colour app icon on Windows (a template silhouette vanishes on a dark taskbar) and drops the menu-bar-only Ctrl+N hint. - Touched-file paths and git's toplevel share one spelling for Windows paths, so Claude's edits are credited in AI changes. - Copy names the computer and file manager per platform: this Mac or this PC, Finder or File Explorer. - The usage-snapshot test spaces its rewrites past one file-time tick. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…design - Windows daemons run from a per-build copy in the run dir, so an update can replace the installed kriyon-ptyd.exe while sessions are open. - With no real Python on Windows the hook entries are left out (the companion still loads) instead of failing on every event. - Companion files are written only when their contents change, so a launch no longer reloads the plugin in every live session. - ADR 0054 records how Kriyon runs on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Off macOS the tour spells its shortcuts with Ctrl, leaves out ⌘N (a menu bar shortcut there is no menu bar for), and no longer points at a Help menu Windows doesn't have; Settings' tour hint does the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A delete on a drive without a Recycle Bin used to be silently permanent: FOF_NOCONFIRMATION answered Windows' own warning. FOF_WANTNUKEWARNING brings that warning back, and saying no fails the delete. New and renamed entries now refuse names Windows reads as something else: a trailing dot or space (.git. would become .git), a colon (a file stream), the characters Windows forbids, and device names such as NUL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Force-stopping a stuck daemon no longer walks its children by parent pid. Windows never updates a parent pid when the parent exits, and pids are reused, so that walk could end unrelated processes; the daemon's job already ends its tree. Every Windows terminate now goes through one gated helper beside signal_gated. Busy on Windows is one rule, windows_command_of in kriyon-core: the shell has a live child. The app's sweep and the daemon both use it; the daemon reads it from its job's members, so a process a finished command left behind no longer holds a session busy forever. npm-installed Claude Code (claude.cmd, or node on @anthropic-ai/claude-code) now reads as claude, so auto-sleep and the attention checks see it. The test fixture's profile path is a placeholder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Windows file identity was the creation time, which NTFS hands on to a file made at a just-deleted path within about 15 seconds. A stopping daemon could then delete a newer daemon's bridge socket, and a replaced spool could keep the old cursor. The identity is now the volume serial number and file index, the Windows equivalent of device and inode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
create_session now reports the session shell's language (ShellLanguage in kriyon-core), so the frontend no longer guesses PowerShell from the user agent. The PowerShell launch line reads the seed prompt as UTF-8, and a nested session's env is removed again when its claude ends, as a POSIX NAME=value prefix would be. Hook and status-line commands quote their paths with sh_quote, so a profile folder with an apostrophe works. With no Python to run the hooks, each session now says its status is unavailable because the hooks need Python, instead of looking applied while nothing ever fires. Also moves two doc comments back onto their functions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The frontend now has one Windows-path rule, isWindowsPath, which also knows network shares. canonicalDir uses it, so a share root matches git's //server/share spelling. The Rust outside-project check reads shares too, works out the home folder from a Windows cwd, recognises Windows and Git Bash paths in commands, and the sandbox compares a long verbatim path in its ordinary form. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bootstrap, the editor launcher and the Python lookup each had their own way to find a program on the PATH. spawn::on_path is now the one, honouring PATHEXT. The setup command uses shellinit::WINDOWS_SHELL, and the CREATE_NO_WINDOW flag is defined once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tray menu no longer shows Ctrl+N and Ctrl+Q off macOS, where nothing
binds them. The tray popover uses platformKeys for its hint, and copy that
names the Help menu is marked {mac:...} where it is written rather than
matched by a regex over the wording.
Copy tests now pin the platform and assert literal text, and os.ts has its
own tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in the worktree terminals (#47) and the 0.15.0 release (#49). The one conflict was daemon_rt.rs's imports: it keeps kriyon_core::uds's UnixStream, which Windows needs, and dev's HashMap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
Review and fix — pass 1Full review of the pull request at 7530809, then fixes and a re-check of them, through 0335b4b. Fixed 25 issues in 2 passes. All checks green on macOS and on a Windows 11 machine.
Notes
Fixed this pass
Checked by 5 finders (processes, correctness, boundary, contract, tests, frontend, public text, docs, left behind, step 5 re-check of the fixes) · architecture review · scorer: 55 scored, 25 kept. Ready to merge, as far as this review can see. Nothing is open from this pass or any pass before it. |
The dialog was centred with align-items inside a scrolling page. When it is taller than the window, a flex-centred child overflows upward, past where the page can scroll, so its top was cut off. This showed on Windows at the default 820px window height and applies to macOS too. The panel now centres itself with auto margins, which only centre it while it fits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 of 4 tasks
The PowerShell launch line escaped the seed prompt's double quotes for Windows PowerShell 5.1, which passes a native argument's quotes raw. pwsh 7.3 and later, which a Mac or Linux user can have as $SHELL, escapes them itself ($PSNativeCommandArgumentPassing is Standard), so claude received a literal backslash before every quote. The line now escapes only when that variable is unset or Legacy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 of 4 tasks
This branch has not been deployed
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.
Summary
Kriyon now builds, installs and runs on Windows 10/11. It was tested by hand on a real Windows 11 machine: the NSIS installer, the first-run screen, sessions (start, resume, close, crash recovery), live status and usage, the tray, notifications, the Files view (browse, edit, save, AI changes), the activity log, the structured view, the command palette and the app tour. Reinstalling over a running session also worked, and the session survived.
The design is recorded in
docs/adr/0055-windows-support.md. In short:uds_windowsbehindkriyon_core::uds.kriyon-ptyd.exewhile sessions are open.psrows.canonicalizegoes throughdunce(clippy now bans the std one), repo-relative paths use/, and the frontend readsC:\paths.Fixes that also matter on macOS:
Known gaps
python.exewhen there is one. With none, it leaves the hook entries out instead of failing on every event; the companion still loads. Rewriting the hook scripts as a small Rust program would remove the dependency.Test plan
pnpm checkon macOS (run by the commit and push hooks)Checklist
dev.pnpm checkpasses.🤖 Generated with Claude Code