Daemon Mode
Max runs a background daemon to keep responses fast. The daemon holds the Max runtime in memory so commands like search, tab completion, and status return instantly instead of booting from scratch each time.
How it works
Section titled “How it works”When you run a Max command, the CLI connects to a daemon process over a Unix socket. The daemon executes the command and streams results back. Because the runtime is already warm - workspace loaded, connectors initialised, database connections open - there’s no startup cost.
You type: max search linear-1 LinearIssue --limit 5 │CLI binary ├── Connects to daemon via Unix socket ├── Sends command as structured request ├── Receives streamed output └── Prints results
Daemon ├── Already running (runtime warm) ├── Receives request ├── Executes against loaded workspace └── Streams results backThe daemon listens at ~/.max/daemon.sock and writes its PID to ~/.max/daemon.pid.
Direct mode
Section titled “Direct mode”If you need to bypass the daemon, use --direct:
max --direct search linear-1 LinearIssue --limit 5In direct mode, Max starts a fresh runtime, executes the command, and exits. This is slower (startup cost on every invocation) but useful for troubleshooting or when the daemon is unhealthy.
Troubleshooting
Section titled “Troubleshooting”Daemon seems stuck
Section titled “Daemon seems stuck”If commands hang or return unexpected errors:
# Kill the daemon processpkill bun
# Your next max command will start a fresh daemon automaticallymax statusChecking logs
Section titled “Checking logs”Daemon logs are written to ~/.max/daemon.log:
tail -f ~/.max/daemon.logWhat’s next
Section titled “What’s next”- CLI Overview - the full command set
- Targeting - how commands find their target node