AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Keeps Claude Code sessions alive and reachable.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Shows every Claude Code session, and keeps the ones you choose alive, awake and reachable.README 전문 보기 ↗Shows every Claude Code session, and keeps the ones you choose alive, awake and reachable.
CC Babysitter is one local page for every Claude Code session on a machine, whatever app runs it: a terminal, a background session, Claude Desktop or VS Code. Babysit a session and CC Babysitter keeps the computer awake; if the session's app closes while you are away, the session carries on in the background with Remote Control, under the same id, so you can still reach it from your phone. It is one Go binary for macOS, Windows and Linux, plus a windowless copy of it on Windows, the page is served on 127.0.0.1, and there is nothing else to install.
The docs have a ten-minute tutorial, how-to guides, every command, how CC Babysitter works, and a troubleshooting entry for every warning, with search.
No matter how hard you hope or try, your computer and the Claude Code app will find a creative way1 to kill the remote-controlled session you started before leaving the computer, hoping you could keep issuing destiny-defining orders to your coding agents while you're vacationing where the map gives up. Well, this has happened to me, and believe me, we are not alone2. Of course, you can go ahead and write some watchdog scripts on a laptop, or tmux and whatnot on a server, but some of us prefer a babysitter.
If a babysat session's app dies, the session comes back in the background with Remote Control on, and the computer stays awake. On a server, babysat sessions survive SSH drops and reboots, no tmux needed. And one page shows every Claude Code session on the machine, in any app, with its tokens and uptime. Your agents can use it too: ccbabysitter babysit self.
macOS and Linux:
curl -fsSL https://ccbabysitter.dev/install.sh | sh
Windows, in PowerShell:
irm https://ccbabysitter.dev/install.ps1 | iex
Either command downloads the binary of the latest release for your system and processor from the releases page, checks it against the release's checksums.txt, and installs it without admin rights or sudo:
~/.local/bin/ccbabysitter. When that folder is not on your PATH, the script prints the line to add to your shell's profile.%LOCALAPPDATA%\Programs\CCBabysitter\ccbabysitter.exe, with ccbabysitter-background.exe beside it, the same program built to show no console window, which is what runs in the background. That folder is added to your user Path.On a Linux machine with no display, such as a server you reach over ssh, the script then runs CC Babysitter once when your systemd user manager is available: it sets itself up as a service and prints how to connect from your laptop. On a Linux desktop, a Mac or a Windows machine where CC Babysitter already runs in the background, the script runs it once too, which restarts it on the new version; on Windows it first asks the running copy to quit, since Windows does not let a running program be replaced. Everywhere else the script prints how to start it. Run the same command again to update. A copy from before version 0.5 running in a window has no quit command: quit it there with Ctrl+C first, and the script says so.
Three environment variables change what the scripts do: CCBABYSITTER_VERSION installs that version, such as v0.4.0, instead of the latest, CCBABYSITTER_INSTALL_DIR installs into another folder, and CCBABYSITTER_DOWNLOAD_URL is a base address to download from instead of GitHub releases, for mirrors (it skips the HTTPS pin, so use an https:// address). On macOS and Linux:
curl -fsSL https://ccbabysitter.dev/install.sh | CCBABYSITTER_VERSION=v0.4.0 sh
curl -fsSL https://ccbabysitter.dev/install.sh | CCBABYSITTER_INSTALL_DIR="$HOME/bin" sh
On Windows, in PowerShell, where a variable set this way stays set for the rest of that window:
$env:CCBABYSITTER_VERSION='v0.4.0'; irm https://ccbabysitter.dev/install.ps1 | iex
$env:CCBABYSITTER_INSTALL_DIR="$env:USERPROFILE\bin"; irm https://ccbabysitter.dev/install.ps1 | iex
You can also download a binary from the releases page yourself (ccbabysitter-<os>-<arch>, with .exe on Windows, for amd64 and arm64) and check it against checksums.txt. On Windows, also download ccbabysitter-background-windows-<arch>.exe and save it as ccbabysitter-background.exe in the same folder; without it CC Babysitter runs only in the terminal. The binaries are not signed, so a few extra steps apply to a download by hand:
chmod +x ccbabysitter-<os>-<arch>.xattr -d com.apple.quarantine ccbabysitter-darwin-<arch>.Every release binary carries a build provenance attestation: gh attestation verify <file> --repo pejmanebrahimi/ccbabysitter --signer-workflow pejmanebrahimi/ccbabysitter/.github/workflows/release.yml checks it was built from this repository by its release workflow.
In Claude Code you can also install the CC Babysitter plugin; on first use it gives you the one command that installs and starts CC Babysitter, to run in your terminal app. See Use it from Claude Code.
Or install it with Go 1.27 or later, which puts it in $(go env GOPATH)/bin:
go install ccbabysitter.dev/ccbabysitter/cmd/ccbabysitter@latest
ccbabysitter. Its page opens in your browser. The page's address includes a key that only your account can read, and ccbabysitter status shows that address again. The page ccbabysitter opens for you stays signed in until CC Babysitter restarts, after an update or a restart of the computer; run ccbabysitter again to open it. CC Babysitter then runs in the background, starts again when you log in, and gives the terminal back./rc in a terminal, or the switch in Claude Desktop or VS Code. Then press Babysit on its card.ssh command it printed, then open the address it shows. Keep that window open: the page works only while it is connected. The address includes the page's key, and ccbabysitter status on the server shows both again.ccbabysitter start and the project folder's path, adding --trust the first time for a folder Claude Code has not run in. Or, in the project folder, run claude --bg --remote-control. CC Babysitter babysits new sessions as soon as they start.claude attach <id>.Install the plugin in Claude Code:
/plugin install ccbabysitter --marketplace pejmanebrahimi/ccbabysitter
Then ask in your own words:
It works in Claude Code only, on the computer CC Babysitter runs on, and it never puts the page's key in the chat: to show the page it runs ccbabysitter open. If CC Babysitter is not installed or not running, it gives you the command to run in your terminal app. See plugin/README.md for what it runs and when it asks first.
Your agents can use it too: ccbabysitter babysit self. The commands below talk to the CC Babysitter that is running, do what the page does, and work the same for a person or an AI agent. ccbabysitter --help lists them, and ccbabysitter help <command> explains one.
ccbabysitter babysit self keep the session this runs in alive
ccbabysitter list --json every session on this machine, as JSON
ccbabysitter babysit api babysit another session, by name, short id or id
A session is named by its id, its short id, its name, or self. A full id always wins. A session that runs or is babysat wins over a conversation that is not running. A word that fits two sessions, as a short id or a name, is refused. self is always the session the command runs in. Add --json for one JSON document on stdout. Its top level always has "schema": 1, and fields are only ever added. Exit codes: 0 done, 1 refused, 2 wrong usage, 3 CC Babysitter is not running, 4 no such session or more than one. ccbabysitter help <command> documents each command's JSON fields. Actions taken this way show in Activity with "from the command line". ccbabysitter list ends with the conversations from the page's Not running list, and show gives the command that starts one again. To try the commands without touching anything real, start ccbabysitter --demo and add --url with the address it prints.
Preview. CC Babysitter is early: it has been tested by hand, and there are no automated tests against a real Claude Code install yet; the commands are tested end to end against the built-in demo. Known limits:
graphical-session.target, such as some window managers started by hand, CC Babysitter does not start by itself at login. A plain ccbabysitter still starts it in the background.Behaviour and settings may change before 1.0. Please report problems by email to [email protected] or as issues. Report a security problem privately instead, as SECURITY.md says. The page's About panel has your version details to copy, and how to update. What changed in each version is in docs/CHANGELOG.md.
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.
status say it is kept awake while its lid is open. When the computer slept while sessions were babysat, Activity says so once it is awake, with the time they could not be reached, and on macOS whether the lid was closed.claude --bg --resume. Activity and the In background card say why the session went down, when CC Babysitter can tell: for example, Claude Desktop restarted for an update, or the computer restarted.claude stop, which keeps the conversation, and starts the session again in the background, and Activity says why. The turn that froze is lost. After three freezes in two hours it stops trying, and the card shows the session as stuck until you press Try again, which stops the frozen copy if it still is one. When claude stop cannot stop it, Activity says how to stop it by hand. A frozen session in a terminal or an app is left as it is, since it belongs to that app; its card, show and list say it is not responding.claude stop, which keeps the conversation.ccbabysitter turns it on the first time it starts CC Babysitter in the background, also when you upgrade, as Start at login below says.claude stop, to start it again, and Activity says so. Try again on a session stuck after freezing stops its copy too, but only while it is still the same copy and still frozen.claude CLI.127.0.0.1, requests that come from other web pages are refused, and every request must carry the page's key, which only your account can read.ccbabysitter settings autostart off, or on a desktop in Settings.%LOCALAPPDATA%\CCBabysitter on Windows, the XDG data directory elsewhere: ~/.local/share/ccbabysitter, or $XDG_DATA_HOME/ccbabysitter when that is set).ccbabysitter start CC Babysitter. It runs in the background and starts at login
ccbabysitter --foreground run in this terminal until Ctrl+C
ccbabysitter --no-open start it without opening the page
ccbabysitter --demo scripted sessions, touches nothing real
ccbabysitter --port N with --foreground, prefer this port for the page, 47391 by default, else a random free port
ccbabysitter install on Linux, set it up to start at boot and keep running after logout
ccbabysitter uninstall remove CC Babysitter from this computer, after asking
ccbabysitter reset delete the state folder after confirmation
ccbabysitter version print the name and version
ccbabysitter status is it running, where, and what it is doing
ccbabysitter list every Claude Code session on this machine
ccbabysitter show S one session in full
ccbabysitter babysit S keep S alive: if its app dies, it comes back in the background
ccbabysitter unbabysit S stop babysitting S, which keeps running where it is
ccbabysitter retry S try again on a babysat session that is stuck
ccbabysitter stop S --yes stop the background copy of S and keep the conversation
ccbabysitter start PATH on a machine with no display, start a babysat session in PATH
ccbabysitter activity [S] what CC Babysitter did and why, newest first
ccbabysitter settings show the settings, or change one with: settings NAME VALUE
ccbabysitter open open the page in your browser, printing no key
ccbabysitter quit quit CC Babysitter. Babysat sessions keep running where they are
ccbabysitter help COMMAND everything about one command
On a Linux server, ccbabysitter prints the command to connect from your laptop, such as ssh -o ExitOnForwardFailure=yes -o ServerAliveInterval=30 -L 127.0.0.1:47392:127.0.0.1:47391 user@host. While that connection is open, open the address it prints, http://127.0.0.1:47392/?token=... with the page's key. Your laptop's side uses port 47392, so CC Babysitter on the laptop, which uses 47391, is not in the way. The same window stays an ordinary shell on the server. When the connection closes or the server restarts, run the command again, and the page reconnects. To start a new session there, run ccbabysitter start with the project folder's path. It babysits the session, and when Claude Code does not trust the folder yet it says so; with --trust it answers Claude Code's own question whether to trust it for you. On a cloud server behind NAT, the printed address can be the server's private one; use the address you normally ssh to instead. To run CC Babysitter only while a terminal stays open instead, use ccbabysitter --foreground.
New session on the page starts a session on the server: type the project folder's path, and CC Babysitter starts it in the background and babysits it. ccbabysitter start with the path does the same from a terminal. A folder Claude Code does not trust yet needs your yes first, on the page or as --trust, and then CC Babysitter answers Claude Code's trust question for you. While Claude Code is not logged in, both say so and start nothing.
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.
Run ccbabysitter uninstall. It says what it removes and asks first, then removes everything CC Babysitter put on this computer:
lingering-turned-on in the state folder; lingering that was already on stays on, since other services of yours may need it.~/.local/share/ccbabysitter (or $XDG_DATA_HOME/ccbabysitter) on macOS and Linux, %LOCALAPPDATA%\CCBabysitter on Windows.~/.local/bin or wherever it is, and the folder stays. On Windows it is the folder %LOCALAPPDATA%\Programs\CCBabysitter, which also comes out of your user Path; Windows cannot delete a running program, so the folder goes a moment after the command ends. A program anywhere else, such as a folder you chose with CCBABYSITTER_INSTALL_DIR, loses only CC Babysitter's own files, and the folder stays, also on your Path. A ccbabysitter that is a link loses the link, and what it points at stays.Babysat sessions keep running where they are. ccbabysitter uninstall --yes asks nothing, for a script with no terminal to ask in. ccbabysitter uninstall --keep-files only stops the background copy and removes start at login, and a later plain ccbabysitter turns it on again, as on a machine that never had CC Babysitter. Another ccbabysitter still on your PATH, such as one go install put in Go's bin folder, is named at the end, for you to delete if you want. A copy run with go run has no program to delete. If you added the Claude Code plugin, remove it in Claude Code with /plugin.
The claude CLI at run time, on PATH or where its installer puts it (~/.local/bin or ~/.claude/local): CC Babysitter reads Claude Code's own files and drives sessions through the CLI. It needs Claude Code 2.1.275 or later. With an older CLI it still runs, but prints a warning when it starts, since older versions may word their output differently and some things may not work as described. Building needs only Go 1.27 or later.
git clone https://github.com/pejmanebrahimi/ccbabysitter
cd ccbabysitter
go test ./...
go build -o bin/ccbabysitter ./cmd/ccbabysitter
See CONTRIBUTING.md to send a change, and SECURITY.md to report a vulnerability.
MIT. See LICENSE.
CC Babysitter is an independent open-source project. It is not made by, affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.
The ones I've run into: the Claude app updates itself and, for some reason, fails to start again; or it does come back after the update, but only some of the remote-controlled sessions are restored. Your computer or server can also act up and restart itself, for any reason, good or bad. ↩
Reports on Claude Code's issue tracker: #95364, #94049, #99585, #100114, #89599. ↩
ccbabysitter list. A run stays a run even if you carry on chatting in it.claude attach <short>, and on a server a second one for the same command run over ssh from another machine. A background copy stopped from the page keeps both on its Not running row, until CC Babysitter restarts.