Skip to content

feat: launchd daemon option for persistent proxy#1

Open
schwarztim wants to merge 1 commit intomainfrom
launchd-daemon
Open

feat: launchd daemon option for persistent proxy#1
schwarztim wants to merge 1 commit intomainfrom
launchd-daemon

Conversation

@schwarztim
Copy link
Owner

launchd Daemon Option

Replaces nohup/disown process management with a macOS LaunchAgent for robust, persistent proxy lifecycle.

What changed

  • claude-copilot — uses launchctl bootstrap/kickstart instead of nohup
  • launchd/com.copilot.proxy.plist — new LaunchAgent config

Benefits

  • Auto-start on login (RunAtLoad)
  • Auto-restart on crash (KeepAlive) — verified: process respawns within seconds
  • Singleton — launchd ensures only one instance runs
  • Survives shell/terminal exit — no more orphaned or lost proxy processes

Install

cp launchd/com.copilot.proxy.plist ~/Library/LaunchAgents/
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.copilot.proxy.plist

Replaces nohup/disown with a macOS LaunchAgent that provides:
- Auto-start on login (RunAtLoad)
- Auto-restart on crash (KeepAlive)
- Singleton by design (launchd manages one instance)

Install: cp launchd/com.copilot.proxy.plist ~/Library/LaunchAgents/
Load:    launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.copilot.proxy.plist

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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