‹ Changelog
NEW · CLI

Daemon Mode — Run SessionCast as a Background Service

Run the SessionCast agent as a background service that survives terminal closure, with capacity limiting and an isolated git worktree for each session.

SessionCast CLI now supports daemon mode — run the agent as a background service with capacity limiting and automatic worktree isolation.

Why Daemon Mode?

Previously, sessioncast agent ran in the foreground. Close the terminal, and the agent dies. Daemon mode solves this:

  • Background execution — survives terminal closure
  • Capacity limiting — control how many sessions can run simultaneously
  • Worktree auto-creation — each session gets an isolated git worktree
  • PID file management — clean start/stop lifecycle

This is SessionCast’s answer to Claude Code’s remote server mode — but tool-agnostic. Works with Claude Code, Codex CLI, Gemini CLI, Ollama, or any terminal tool.

Quick Start

# Start daemon with capacity limit
sessioncast daemon start --capacity 5

# Check status
sessioncast daemon status

# View logs
sessioncast daemon logs

# Stop daemon
sessioncast daemon stop

Configuration

Add to ~/.sessioncast.yml or use sessioncast config set:

daemon:
  capacity: 5
  worktree:
    enabled: true
    baseDir: ~/projects

Or via CLI:

sessioncast config set daemon.capacity 5
sessioncast config set daemon.worktree.enabled true

How It Works

  1. daemon start spawns a background process and writes a PID file to ~/.sessioncast/daemon.pid
  2. The daemon scans tmux sessions and streams them to the relay — just like sessioncast agent
  3. When capacity is reached, new session creation requests are rejected
  4. With worktree mode enabled, each new session gets its own git worktree for isolation
  5. daemon stop sends SIGTERM, waits for graceful shutdown, then removes the PID file

Compared to Claude Code Remote

Feature Claude Remote SessionCast Daemon
Max sessions 32 Configurable
AI tools Claude only Any (Claude, Codex, Ollama, …)
Worktree isolation Built-in Built-in
Background mode Yes Yes
Capacity control Fixed --capacity N
PID management Internal ~/.sessioncast/daemon.pid

Update

sessioncast update

Requires CLI v0.1.20 or later.

‹ All changes