Repository navigation
Conversation
Windows gets a console session that reads keys as terminal sequences and restores the console's modes and code page, a job object in place of a process group for Git, positional file I/O, and settings and state under APPDATA and LOCALAPPDATA. Usage, setup, tasks, Rex and the Markdown preview report that they are not supported on Windows yet instead of running.
Each folder on the way to a working file is opened relative to the one before it with NtCreateFile, never through a reparse point, and held so it cannot be moved mid-save. Links, junctions, device names, alternate streams and cloud placeholders are refused rather than followed or recalled, and the save handle shares only reading while it is open.
A dedicated workflow builds and tests the MSVC target on a GitHub-hosted Windows runner. Its pseudoconsole test opens a CRLF, BOM and Unicode file with milo view --edit, saves an edit, refuses to write over a change made by another program, quits, and checks the console modes are as before.
Video playback says it is not supported on Windows yet before it touches the file. Editing tests that only need ordinary files, including the BOM, CRLF and Unicode save tests, now run on Windows too.
…Windows Each command says it is not supported on Windows yet. Secret files and trusted-program checks refuse on Windows rather than skip their ownership and mode checks. Unix-only tests are gated, and a Windows test checks that the outline does not descend into directory links or junctions.
The I/O manager rejects that option beside FILE_DIRECTORY_FILE as an invalid parameter, so every Reader root open failed on NTFS. Test the temporary folder as written, canonicalized and with the verbatim prefix removed.
Windows can't lock a directory handle, so preference saves lock a fixed file in the folder. Test fixtures drop the verbatim prefix Git can't use, a path through a file is reported as not a directory, and tests of features that refuse on Windows run on Unix only.
Canonicalizing on Windows adds a verbatim prefix that a path from Git or the user never has, so the Reader could not place a file in its repository. Drop the prefix wherever the plain form names the same file.
Git for Windows reads a backslash in a pathspec as a folder separator, so the escaped final character turned page.txt into page.tx/t and every working diff came back empty.
The Reader and agent output now name a file inside a project the way Git does, so committed reads, tabs and places find it. Folders on the way to a Reader entry share delete access, so Milo never blocks another program's rename. Tests of native actions, Rex requests, tasks, tab titles, video and file names Windows can't hold run on Unix only.
The Reader's stamp now includes the file length, so a write that lands in the same change-time tick as the last one is still seen.
The test's output is redirected on CI, and a child started without explicit handles inherited it, so Milo refused to run without a terminal.
An eighth field put the startup flags where the window state goes, so the child never got the pseudoconsole's handles.
The pseudoconsole repaints the first report when Milo leaves its alternate screen, so counting reports could not tell the two apart.
A manual run given a recipient certificate encrypts the executable the tests used and keeps it for one day. Every run prints that executable's hash.
The optimised build is what a release would ship, so the native job runs every test against it too, prints its hash beside the debug build's, and a sealed manual run keeps the release executable.
Git's glob never lets a bracket match a separator, so a file whose name ends without ASCII, such as docs/日本語, got an empty diff. The stand-in character is now the last ASCII character other than a slash, and a test reads exactly one file's diff for nested, non-ASCII and bracketed names.
milo ssh stays supported on Unix and says it isn't supported on native Windows yet. The terminal is lent and taken back through the shared raw_mode and restore, and the Unix-only ownership, mode and process code is gated. Patches from the milo ssh thread.
milo ssh isn't supported on native Windows yet, so the tests that lend a pane to another host run only where it is.
Session folders are walked relative to held directory handles, with every link, junction and mount point refused. Usage accounts, OpenCode and OMP say they are not supported on Windows yet, and so do the usage doctor and menu stream.
Each pane draws its content, takes a key or two, quits with exit code 0 and leaves the console modes as they were.
Windows has no sqlite3 program, so the query runs in process against System32\winsqlite3.dll, loaded from System32 only, and writes the shell's JSON form. Links are refused before opening because that build follows them despite SQLITE_OPEN_NOFOLLOW. Wall time and output stay bounded.
Windows' SQLite ignores readonly_shm and makes the missing file, which the native run showed. Only the checked query, which requires both sidecars, is the guarantee now.
Windows' SQLite ignores readonly_shm, so opened in place it writes the shared-memory file and makes missing sidecars. Read the database and its log through read-only handles instead, fold committed frames into a copy in memory when the log header is unchanged around the copy, and query that copy with sqlite3_deserialize. Nothing beside the database is opened or written; a database and log over 64 MiB are left unread.
…age copy The lock keeps a closing writer from checking its log into the database and deleting it during the copy, and keeps a rollback writer out of the file; a hot journal, a replaced file, a changed size or a rewritten log header makes the copy start again, then leaves the database unread. A log is folded only into a WAL database with its page size, and never past the size limit.
…d end Hold WAL read-lock slot 0 beside the database's shared lock, so no checkpoint can write the database during a copy, and replay the log only to the end a live writer published in its WAL index. A log with an unknown version or page size leaves the database unread; WAL mode follows the read version byte; page 1 is checked after replay. Output is bounded before every append, TEXT is read as UTF-8, files are told apart by their 128-bit IDs, reads stop at the deadline, and locks are released before the copy is folded.
Open the packaged settings editor on loopback through a private handoff page in %LOCALAPPDATA%\milo that lasts 120 seconds and is removed when the browser connects, the open fails or Milo stops. ShellExecuteExW gets only the page path. Settings, layouts and lock files Milo creates admit only the user and SYSTEM, and per-user locks use LockFileEx on such files; a lock file with any other security is refused. sys::poll waits on sockets through WSAPoll. --host, --forwarded-port, settings transfer and alert routes stay explicitly unsupported on Windows. The native job adds a headless Chrome handoff test and a Chromium smoke against the tested release build.
The Chromium smoke chooses Claude Code always shown and OpenCode hidden, saves them globally, finds them after a restart and hands the saved file to a pseudoconsole test, which opens the Usage pane without it and with it: Claude Code's tokens appear only with the browser's choice.
…g the WAL index The index is SQLite's shared memory: a file read is not guaranteed to see what a live writer published through its mapping, and an index left by a stopped process cannot be told from a live one without a mapping or a lock that SQLite would notice. Use SQLite's recovery rule instead: every frame that carries the log's salts and continues its checksum, up to the last commit. Unlock guards are made only for locks taken, and folding and loading stop at the deadline.
A database with a write-ahead log or index beside it is left unread instead of folding its log, so every total is one SQLite's committed reader would see. The sidecars are checked before and under SQLite's shared lock and again after the copy; a hot journal is refused.
Sidecar absence proves nothing when the owner opens the database by another name, so a database with a second hard link, or read by a name other than its own long name, is left unread, and a log, index or journal beside its short name counts. The pane now shows the closed- only note while a look finds OMP or OpenCode using its database, rather than whenever one existed at startup.
A failed GetShortPathNameW no longer reads as having no short name, and the pane's in-use note looks under the same names as the reader.
Rex has a Windows app in preview, so task and Markdown preview messages now say what Milo has not ported rather than that Rex cannot run.
The browser hand-off page and setup locks now live in folders only this user and SYSTEM may change, created with that security and refused if anything else made them. The page's folder is held open so it cannot be renamed while the browser reads it, lock files share no deletion so they cannot be swapped while held, and a newly created private file whose access list did not take, as on FAT, is removed and refused. Preference saves lock a private file and give up after five seconds rather than waiting on another account for ever. The shell is no longer asked to share Milo's console with the program it starts.
On Windows the settings page no longer offers Claude Code's status line, and Rust refuses it, because the command it would install only says it is unsupported. Settings and Health no longer run a bare rex command, which Windows would look for in the working folder. The Usage file walk counts names as it reads them and marks a folder that stops answering as partial. The browser smoke redacts URLs and tokens from its errors, the Windows console tests drop every variable that points Usage at real data, and a dispatched run seals its executable only after every test has passed.
The hand-off page now goes under the local application data folder the system records for the user rather than one the environment names, and both the page and each lock file are checked, while their private folder is held, to resolve inside that folder; the browser is given the page's resolved path. No Rex command is run on Windows from any entry point: scripts, Health's layout check, server and app queries, alerts, attention, presence and remote editors all report Rex as unavailable.
install-windows.ps1 installs the executable beside it for this account only after checking its SHA-256, keeps a receipt and a copy of itself as uninstall-milo.ps1, and adds its folder to the user PATH once. An upgrade moves a running milo.exe aside rather than failing, and clears it once it has stopped. Removal refuses a running or changed milo.exe and takes back only the PATH entry it added; settings stay. Uninstall in Home explains this instead of saying it is unsupported. Native CI installs, upgrades and removes the tested release this way, and a dispatched run seals that package.
Doctor now reports the host, worktree, preferences, the layout saved in the browser and every Usage source on Windows, and names the Markdown preview, Rex integration, layout listener, Discord presence and Claude status line as not supported on Windows yet, without running rex or raising problems for pieces Windows cannot have. Its Usage lines say when OMP or OpenCode is in use or too large to read. The settings page says why alerts, presence and Rex are missing on Windows instead of showing a generic or misleading message.
…r removed The installer rebuilt the user PATH from its non-empty entries, so a trailing or doubled semicolon was lost on removal. It now appends its folder to the value as written and removes only that entry. The install test starts from a PATH with empty entries and expects it back byte for byte.
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.
Refs #54. This draft adds Milo's first native Windows (x86-64, MSVC) version. It covers the Reader, Outline, History and Home panes, the Usage pane, and the packaged browser settings from
milo web, all tested on a GitHub-hosted Windows runner. Anything not ported says "not supported on Windows yet" instead of doing nothing. Nothing is published.What changed
milo web.rexcommand on Windows, so arex.exebesidemilo.exeor in a project is never started.Limited support: OMP and OpenCode on Windows
Windows has no
sqlite3program, and the SQLite built into Windows writes beside a database it opens, even read-only. So Milo never opens these databases in place. It copies a database into memory under SQLite's own shared lock and queries the copy. It does this only when no -wal, -shm or unfinished -journal file is beside the database, and it checks again after the copy.Not supported on Windows yet
These are missing in this version, as opposed to inputs that a Windows machine simply doesn't have:
milo setup,doctor,uninstalland layout profiles;milo web --hostand--forwarded-port;milo sshstays supported on Linux and macOS and is not supported on native Windows. There is no menu bar or tray app.Rex on Windows. Rex's Windows app is in preview, and Rex Server on Windows is in testing: personal server only, one account, reached over a named pipe. The shared or login server, socket activation,
rex terminfo setup,rex server install ssh://and Tailscale Serve are not available on Windows. Milo's Rex integration isn't ported to Windows yet, so native Windows, WSL (a Linux build) and a Windows Rex client attached to a remote host are separate cases. Only native Windows is covered here.Verification
.github/workflows/windows.ymlruns on a GitHub-hostedwindows-2025runner (Windows Server 2025, build 26100) with Rust 1.91.0:cargo testpasses in both debug and release profiles.tests/windows_console.rsdrives the built executable in a real pseudoconsole: the Reader edit/save/refuse workflow, Home, Outline, History, and Usage reading local Codex sessions.milo web. It saves layout and Usage choices, and the next pseudoconsole run checks that the Usage pane follows the saved choices.The Linux and macOS jobs run as before.
Not covered: Windows Terminal or conhost used by hand, launching a real default browser interactively, WSL, and a Windows Rex client. On Windows the settings page still says "No Rex server answered", while Health correctly says Rex integration is not supported on Windows yet.
An independent review covered every change since the previously reviewed head and found no remaining blocker at 828cca2. d9d68ac only moves one existing check earlier.
Screenshots
None: the settings page is the same page as on Unix, and the only new pane text is the notices quoted above.
Compatibility
No new dependencies. Unix behaviour is unchanged, and #126 still merges cleanly on top. No Windows binary is published.