CC Babysitter Docs
On this page

Explanation

How CC Babysitter works

Babysitting a Claude Code session keeps the computer awake, and if the session's app closes, CC Babysitter starts the same session again in the background, with Remote Control.

This page explains what that means, the rules CC Babysitter never breaks, and how it starts at login on each system. "The page" below is the page CC Babysitter serves in your browser. Why it exists is on the home page. For the steps, see Start at login and Run it on a server.

What babysitting does

Apps, the background and servers

A babysat session stays in its own app, and CC Babysitter never moves a session from one app to another. Once a session is carried in the background you can keep using it through Remote Control, attach to it from a terminal with claude attach, as Open in Terminal on the page does, or stop the background copy and open the session again wherever you like. While the copy runs, Claude Desktop shows "Claude Code crashed" for a session that came from it, because only one copy of a session runs at a time. Back to Desktop on the page, or ccbabysitter stop, ends the copy, and Try again in Desktop then picks the session up where it left off.

On a server with no display the same page is the session manager. A plain ccbabysitter there sets it up as a service that survives a reboot, prints the command to connect from your laptop, and gives you the terminal back; ccbabysitter install does the same. Start a session with New session on the page, or ccbabysitter start and a project folder's path, or yourself with claude --bg --remote-control in that folder, and it is babysat as soon as it starts. A session you start yourself is babysat unless you switch that off in Settings. A session started by New session or ccbabysitter start is always babysat. Attach to a babysat session from any SSH shell, unbabysit or stop it when you are done, and reach the page with the command CC Babysitter gave you.

Hard rules

Start at login on each system

On Linux, ccbabysitter runs CC Babysitter in the background through the systemd user manager, writing the unit ~/.config/systemd/user/ccbabysitter.service the first time, and turns start at login on that first time, also when you upgrade from an earlier version. On a desktop the unit starts with your graphical session, after it, so CC Babysitter sees the desktop. On a server it starts at boot and keeps running after you log out. Turn it off with ccbabysitter settings autostart off, or on a desktop in Settings: CC Babysitter keeps running until you quit it or restart, and a later ccbabysitter leaves it off. Every run, and ccbabysitter install, writes the unit again when it no longer matches this binary, such as after you move the binary, and restarts a running copy when its unit changed or it is another version. A copy already running with the right unit and version is left running. ccbabysitter install always turns start at boot on.

On macOS, ccbabysitter runs CC Babysitter in the background as a user LaunchAgent, com.ccbabysitter, loaded with launchctl the way brew services start does it, and turns start at login on that first time, also when you upgrade. The LaunchAgent runs the service, which never opens a browser, so logging in does not open the page; it starts CC Babysitter again if it crashes, but not after ccbabysitter quit. While start at login is on its plist is ~/Library/LaunchAgents/com.ccbabysitter.plist. macOS may show a "Background Items Added" notice the first time, and lists CC Babysitter under System Settings, General, Login Items. Switching it off there under Allow in the Background stops macOS from starting it at all, and ccbabysitter then says so; switch it back on there, or run ccbabysitter --foreground. Turning start at login off moves the plist into the state folder: CC Babysitter keeps running until you quit it or log out, and a plain ccbabysitter still starts it. A Mac reached only over ssh, with nobody logged in at its screen, has no session to load the LaunchAgent into, so there ccbabysitter runs in the terminal.

On Windows, ccbabysitter starts ccbabysitter-background.exe, the windowless copy installed beside it, which runs in the background with no console window; closing the terminal or the app that ran ccbabysitter does not stop it. Start at login, turned on the first time, is the value CCBabysitter under HKCU\Software\Microsoft\Windows\CurrentVersion\Run, which starts the windowless copy at login, again with no window. It replaces the Startup folder script CCBabysitter.cmd that earlier versions wrote, which ccbabysitter removes. A copy installed with go install has no windowless program, so there ccbabysitter runs in the terminal.

Every login entry points at the program where it is at that moment, so keep the program where the install script put it, or somewhere else it will stay, such as ~/bin; a copy in a temporary folder is refused. ccbabysitter writes the unit, the LaunchAgent or the Run value again when the program has moved.

Edit this page on GitHub (opens in a new tab)