hoziron start / stop

Start and stop the Hoziron kernel daemon.

hoziron start

Synopsis

hoziron start [--yolo] [--listen <address>]

Flags

FlagDescription
--yoloAuto-approve all tool calls (no confirmation prompts)
--listen <address>Listen address (host:port). Overrides HOZIRON_LISTEN env var and config

Listen Address Resolution

Priority order (first match wins):

  1. --listen CLI flag
  2. HOZIRON_LISTEN environment variable
  3. [server].listen in config.toml
  4. Default: 127.0.0.1:4200

Examples

# Start with defaults (127.0.0.1:4200)
$ hoziron start
INFO hoziron_api: Hoziron daemon listening on 127.0.0.1:4200

# Start on all interfaces (containers, remote access)
$ hoziron start --listen 0.0.0.0:4200

# Start with auto-approve (development/testing)
$ hoziron start --yolo

# Start with custom config
$ hoziron --config /opt/hoziron/config.toml start

# Start with verbose logging
$ HOZIRON_LOG=debug hoziron start

# Start in background (systemd, Docker, etc.)
$ hoziron start &

What Happens on Start

  1. Loads configuration from $HOZIRON_HOME/config.toml
  2. Initializes the execution kernel with the data directory
  3. Registers configured providers (validates API key env vars exist)
  4. Starts health monitoring (if enabled)
  5. Auto-loads agent manifests from [agents].manifests_dir (if configured)
  6. Binds HTTP server to the listen address
  7. Writes daemon.json with connection info for the CLI client

Daemon Info File

On successful start, writes $HOZIRON_HOME/daemon.json:

{
  "pid": 12345,
  "listen": "127.0.0.1:4200",
  "tls": false,
  "socket_path": null,
  "started_at": "2026-06-04T10:00:00Z"
}

The CLI reads this file to discover where to connect.


hoziron stop

Synopsis

hoziron stop

Flags

None.

Examples

# Stop the running daemon
$ hoziron stop
✓ Daemon stopped

# Stop is idempotent — safe to call if already stopped
$ hoziron stop
⚠ No running daemon found

Graceful Shutdown Sequence

When stop is called (or SIGTERM is received):

  1. Stops accepting new HTTP requests
  2. Suspends running agents (preserves state)
  3. Flushes memory stores to SQLite
  4. Closes database connections
  5. Removes daemon.json
  6. Exits with code 0

Notes

  • The daemon also handles SIGTERM for graceful shutdown (containers, systemd)
  • Ctrl+C (SIGINT) exits immediately with code 130
  • If the binary is locked by a running daemon, use --lib flag for build commands
  • In Kubernetes, set terminationGracePeriodSeconds >= 30 to allow flush

See Also