Skip to content

Run from source on macOS and find agent tools however they were installed - #1

Merged
calesthio merged 3 commits into
mainfrom
macos-support
Nov 25, 2026
Merged

calesthio merged 3 commits into
mainfrom
macos-support

Conversation

@calesthio

Copy link
Copy Markdown
Contributor

Summary

Two related changes:

  1. Commonroom now runs from source on macOS. The signed macOS app comes later, once the developer account is ready. Until then, macOS users run it from source.
  2. The scan finds Claude Code, Codex and Antigravity however they were installed, on both macOS and Windows. Codex bundled in the ChatGPT app on macOS was reported as "not found".

Install locations come from research into each tool's official installers, package managers and desktop apps.

Related issue

None.

Changes

macOS from source

  • New Start Commonroom.command launcher, the macOS counterpart of Start Commonroom.cmd. It opens the desktop app if desktop/node_modules exists. Otherwise it finds Python 3.10+ and opens the browser once /api/health answers.
  • python -m commonroom exits with a clear message on Python older than 3.10. The /usr/bin/python3 that macOS ships is 3.9.
  • Stopping the service now ends running agents. This covers Ctrl-C, closing the Terminal window (SIGHUP), SIGTERM and /api/shutdown. Agents run in their own process groups on macOS, so before this they were orphaned.
  • RpcProcess.__exit__ no longer hangs when a process an agent left behind still holds stdout/stderr. MacPlatform.kill_process_tree also reaches the group after its leader was reaped.
  • On macOS the service refuses a port another program listens on via *:<port>. SO_REUSEADDR otherwise lets 127.0.0.1 bind over it.
  • Desktop shell on macOS:
    • It uses its own profile folder, Commonroom Desktop. Commonroom is the service's data folder.
    • Unpackaged runs log under the profile instead of ~/Library/Logs/Electron.
    • The user's PATH now comes first.
    • It also tries python3.14 and python3.15.
  • The osascript folder picker activates so it opens in front, and the Add project tooltip shows ⌘O on Mac.
  • Docs: README (a macOS from-source section and the platform badge), CONTRIBUTING, ARCHITECTURE, and the bug report log paths.
  • CI: the Python suite runs on macOS (3.10 and 3.13). The desktop job runs on macOS and also checks that the launcher parses and is executable.

Tool detection (macOS and Windows)

  • macOS search path, in order: the inherited PATH, then the login shell's PATH ($SHELL -ilc, between markers, cached 60s), then ~/.local/bin, npm-global, volta, bun, pnpm, mise and asdf, then Homebrew. Apps opened from Finder get launchd's minimal PATH, so this matters for them.
  • Windows search path, in order: the inherited PATH, then the user and machine PATH saved in the registry, then npm, winget Links, Scoop, Chocolatey, Volta, nvm-windows (NVM_SYMLINK), pnpm and bun. It also honours SCOOP, ChocolateyInstall and VOLTA_HOME. Children get the same PATH, so npm .cmd shims can find node.
  • Scan again clears these caches through a new Platform.refresh(), so tools installed after start are found without a restart.
  • ExecutableHints gains env (a user-set full path, checked first), exclude (folders whose match is never the tool), and * wildcards in paths (the newest match wins). New placeholders: {appdata}, {programfiles}, {programdata}.
  • Codex is now found in:
    • the ChatGPT.app bundle on macOS;
    • the official installer folders on both OSes;
    • CODEX_CLI_PATH;
    • on Windows, the Store app's runnable per-user copy in %LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex.exe. Users report "Access is denied" when another program runs the WindowsApps copy, so that copy is now the last resort.
  • Claude Code: %LOCALAPPDATA%\Microsoft\WindowsApps is excluded on Windows. Older Claude desktop apps register a Claude.exe alias there that opens the GUI. Also adds the legacy ~/.claude/local install. The desktop app's private copy is deliberately not used, because its path changes with every update.
  • Antigravity: adds ~/.local/bin/agy on macOS.

Testing

  • python3 -m pytest tests -q: 135 passed, 4 skipped on macOS (Python 3.15)
  • npm test (in desktop/): 3 passed
  • Providers checked manually:
    • Claude Code 2.1.327: detected; a real turn replied in a room.
    • Codex 0.171.0-alpha.13, bundled in ChatGPT.app: detected and model discovery works. I did not run a full turn with it.
    • Antigravity: not installed, so not checked.
  • Operating systems checked manually: macOS only.
    • Detection works with a Finder-style minimal PATH (env -i PATH=/usr/bin:/bin).
    • The data-folder lock and a port conflict both give clear errors.
    • Killing the process group cleans up a real process tree.
    • SIGTERM during model discovery leaves no orphans.
    • The desktop shell starts with npm start and spawns the service.
    • The launcher works both when it starts the service and when the service is already running.
  • Windows was not run manually. The Windows search-path code is covered by tests that fake the registry and the lookup, and run on every OS. This PR's Windows CI is the first real run.

Reviewers should know:

  • agy acp --stdio: Antigravity is still started this way, but its docs show only agy acp. Someone with agy installed should confirm --stdio is accepted.
  • Fake agy: an old Antigravity IDE "install agy command" launcher can also be named agy. It only opens the IDE and has no ACP server.
  • WSL installs stay out of scope: they can't be seen from Windows.
  • Release: Windows installer users need a 0.1.1 release to get the detection fixes. Bump the version in both commonroom/__init__.py and desktop/package.json.
  • Review: the change was reviewed by a separate Fable 5.2 pass, and its valid findings are fixed in this PR.

Checklist

  • The change is focused on a single logical concern. It covers two closely related ones: macOS support and tool detection share the platform layer.
  • I ran the tests above locally, and any manual checks used a temporary data folder (--data), not my real chats.
  • I updated docs/README if behavior or usage changed.
  • Anything that changes how agents are started is called out above. Agents now inherit an augmented PATH, and agents still running when the service stops are killed. No flags, permission or sandbox modes changed.
  • No unrelated files (build output, signing.local.ps1, local config, databases) are included in the diff.

🤖 Generated with Claude Code

Ishan Bhatt and others added 3 commits November 25, 2026 12:15
…lled

macOS from source:
- Start Commonroom.command launcher (desktop app if set up, else Python 3.10+ and the browser)
- Clear error for Python older than 3.10 (macOS ships 3.9)
- Stopping the service (Ctrl-C, closed Terminal, SIGTERM, /api/shutdown) ends running agents
- A turn no longer hangs on processes an agent left holding its pipes
- Refuse a port another program listens on via the wildcard address
- Desktop shell: own profile folder and log folder, user PATH first, Python 3.14/3.15
- Folder picker opens in front; Add project shortcut shown as Cmd+O
- README, CONTRIBUTING, ARCHITECTURE and bug template cover macOS; CI runs on macOS

Tool detection (macOS and Windows):
- macOS: search the login shell's PATH (nvm, fnm, asdf, mise, Homebrew) plus common install folders
- Windows: search the PATH saved in the registry plus npm, winget, Scoop, Chocolatey, Volta,
  nvm-windows, pnpm and bun folders; children get the same PATH
- Scan again clears cached lookups, so new installs show up without a restart
- Codex: ChatGPT.app bundle, official installer folders, CODEX_CLI_PATH, and the Windows Store
  app's runnable copy instead of the WindowsApps one that is access-denied
- Claude Code: skip the desktop app's WindowsApps alias; legacy ~/.claude/local install
- Antigravity: ~/.local/bin/agy on macOS
- ExecutableHints gains env, exclude and wildcard paths

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS module now spells out its own PATH separator and absolute-path
rule, as the Windows module does, so its tests behave the same on any OS.
The Windows search-path tests keep USERPROFILE/HOME, which Path.home()
needs on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The desktop job became a Windows/macOS matrix, so its checks are named per OS
and the ruleset's required "Desktop" check never reported, blocking merge.
A small job named Desktop now passes only when every desktop job passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@calesthio
calesthio merged commit 1a2ab6a into main Nov 25, 2026
8 checks passed
@calesthio
calesthio deleted the macos-support branch November 25, 2026 20:34
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.

1 participant