Daemon Overview

The Stackie daemon (stackied) is a long-running background process that manages all sandbox lifecycle operations. The CLI and dashboard communicate with it over IPC, while AI agents connect through the built-in MCP server.

Startup Sequence

  1. Load settings from ~/.stackie/stackie.yaml
  2. Initialize the database at ~/.stackie/stackie.db
  3. Restore auth session from the OS credential store
  4. Clean up orphaned MCP sessions from the previous run
  5. Start the IPC listener
  6. Start the HTTP API server
  7. Start the MCP server
  8. Start background tasks (health checks, stats, updates)

Starting and Stopping

# Start the daemon
stackie daemon start

# Check if it is running
stackie daemon status

# Stop the daemon
stackie daemon stop

The daemon writes its PID to ~/.stackie/stackied.pid.