What happened?
Multiple issues with the OpenClaw post-setup experience, especially on DigitalOcean:
1. openclaw command not found after SSH reconnect
After the initial spawn session ends (e.g., Ctrl+C or disconnect), SSH'ing back into the box and running openclaw tui or any openclaw subcommand fails with openclaw: command not found.
Root cause: OpenClaw is installed to ~/.npm-global/bin/ and the PATH export is appended to ~/.bashrc, but:
ssh user@ip may not invoke a login shell that sources .bashrc on all distros.spawnrc is sourced in .bashrc, but only if .bashrc itself gets loaded- The user has no obvious way to know they need
source ~/.bashrc or export PATH=~/.npm-global/bin:$PATH first
2. Ctrl+C kills the SSH session / DO instance instead of exiting OpenClaw TUI
Pressing Ctrl+C while in the OpenClaw TUI kills the entire SSH connection rather than just exiting the TUI. On DigitalOcean, this effectively disconnects the user, and when they reconnect they hit problem #1.
Expected: Ctrl+C (or Ctrl+D) should cleanly exit the OpenClaw TUI and drop the user back to a shell prompt on the VM, not terminate the SSH session.
3. WhatsApp channel setup is broken end-to-end
Attempting to set up WhatsApp as a messaging channel:
Proposed fixes
Ensure PATH persists for all SSH session types: Write the PATH export to ~/.profile, ~/.bash_profile, AND ~/.bashrc (covering login shells, non-login shells, and sh). Also ensure .spawnrc is sourced from .profile for non-bash shells.
Fix signal handling in the TUI launch: The restart loop wraps openclaw tui — if Ctrl+C propagates to the SSH pseudo-terminal allocation (ssh -t), the whole session dies. Consider trapping SIGINT in the launch wrapper to cleanly exit the TUI without killing the connection, then drop to a shell.
Add a spawn shell or post-TUI shell: After the TUI exits, drop the user into an interactive shell on the VM instead of disconnecting. This lets users run openclaw channels login --channel whatsapp directly.
Reproduction steps
spawn openclaw digitalocean
# Wait for setup to complete, TUI launches# Press Ctrl+C → entire SSH session terminates# SSH back into the box manually
openclaw tui # → "openclaw: command not found"
Environment
- Cloud: DigitalOcean (also likely affects other clouds)
- Agent: OpenClaw
Filed from Slack by SPA
What happened?
Multiple issues with the OpenClaw post-setup experience, especially on DigitalOcean:
1.
openclawcommand not found after SSH reconnectAfter the initial spawn session ends (e.g., Ctrl+C or disconnect), SSH'ing back into the box and running
openclaw tuior anyopenclawsubcommand fails withopenclaw: command not found.Root cause: OpenClaw is installed to
~/.npm-global/bin/and the PATH export is appended to~/.bashrc, but:ssh user@ipmay not invoke a login shell that sources.bashrcon all distros.spawnrcis sourced in.bashrc, but only if.bashrcitself gets loadedsource ~/.bashrcorexport PATH=~/.npm-global/bin:$PATHfirst2. Ctrl+C kills the SSH session / DO instance instead of exiting OpenClaw TUI
Pressing Ctrl+C while in the OpenClaw TUI kills the entire SSH connection rather than just exiting the TUI. On DigitalOcean, this effectively disconnects the user, and when they reconnect they hit problem #1.
Expected: Ctrl+C (or Ctrl+D) should cleanly exit the OpenClaw TUI and drop the user back to a shell prompt on the VM, not terminate the SSH session.
3. WhatsApp channel setup is broken end-to-end
Attempting to set up WhatsApp as a messaging channel:
openrouter/autoroutes to a model that doesn't make tool calls for setupopenclaw channels login --channel whatsappbut Ctrl+C to exit TUI kills the session (problem Add NanoClaw spawn script #2), and after reconnecting the command isn't found (problem Refactor spawn scripts with shared library and OAuth fallback #1)Proposed fixes
Ensure PATH persists for all SSH session types: Write the PATH export to
~/.profile,~/.bash_profile, AND~/.bashrc(covering login shells, non-login shells, and sh). Also ensure.spawnrcis sourced from.profilefor non-bash shells.Fix signal handling in the TUI launch: The restart loop wraps
openclaw tui— if Ctrl+C propagates to the SSH pseudo-terminal allocation (ssh -t), the whole session dies. Consider trapping SIGINT in the launch wrapper to cleanly exit the TUI without killing the connection, then drop to a shell.Add a
spawn shellor post-TUI shell: After the TUI exits, drop the user into an interactive shell on the VM instead of disconnecting. This lets users runopenclaw channels login --channel whatsappdirectly.Reproduction steps
Environment
Filed from Slack by SPA