You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Studio: optional launchd agent to keep Studio running on macOS CLI installs #17877
On macOS, Studio installed from the terminal (install.sh) stops when the terminal window closes, so its scheduled tasks stop running too. Linux already has an opt-in systemd user service (#9308), and the desktop app has "Run at login", but macOS terminal installs have no way to keep Studio running in the background.
Proposal
An opt-in launchd user agent for macOS that matches the Linux systemd service:
UNSLOTH_INSTALL_LAUNCHD=1 ./install.sh writes ~/Library/LaunchAgents/ai.unsloth.studio.server.plist and loads it. Without the flag, nothing changes.
Binds 127.0.0.1:8888 by default; UNSLOTH_LAUNCHD_HOST / UNSLOTH_LAUNCHD_PORT override it (same as the UNSLOTH_SYSTEMD_* variables).
Restarts Studio only after a crash (KeepAlive → SuccessfulExit = false), so unsloth studio stop leaves it stopped.
Skipped when the desktop app's "Run at login" agent exists, so two servers don't fight over the port.
Never overwrites a plist it didn't write.
scripts/uninstall.sh unloads and removes it before stopping servers.
Output goes to /dev/null, because Studio already writes its own private, rotated logs under logs/server/.
Out of scope
Windows Task Scheduler and the scheduled-tasks UI redesign from the ideas list.
I have this working and tested on a Mac (unit tests, plus a real install with kill -9, studio stop, restart and uninstall), and will open a PR that links this issue.
Activity
Studio: optional launchd agent to keep Studio running on macOS CLI in…