Here's a problem power OpenClaw users hit eventually: you want your agent to send you a notification when a long-running task completes, when a monitored file changes, or when a background script encounters an error. So you pipe the event back through OpenClaw โ€” and it works, but it's wasteful.

Every notification routed through the gateway session gets added to the conversation history. If your agent is running a long overnight task and pinging you every 10 minutes with status updates, those pings consume context tokens on every subsequent turn. By morning, a significant chunk of your context window is status messages.

clawhip is the solution: an event-to-channel notification router that sends messages to your configured channels (Discord, Telegram, etc.) without going through the OpenClaw gateway session at all.

The Context Pollution Problem, Illustrated

Without clawhip (context pollution) Script/Event โ†’ OpenClaw Gateway โ†’ Agent Session โ†’ Channel
Every notification adds to conversation history โ†’ bloats context โ†’ wastes tokens on future turns

With clawhip (clean) Script/Event โ†’ clawhip โ†’ Channel (direct)
Agent session untouched. No history. No tokens. Just a notification.

Installation

npm install -g clawhip

Then configure it with your channel ID and credentials:

clawhip config set channel YOUR_DISCORD_CHANNEL_ID
clawhip config set token YOUR_OPENCLAW_DISCORD_TOKEN
clawhip config set mention "@your-user-id"

Test it:

clawhip send "Hello from clawhip"

Usage in Scripts and Automation

The primary use case is wrapping long-running processes to notify you when they complete or hit certain output keywords:

# Basic: notify when a command finishes
clawhip run -- python my_long_script.py

# With keyword monitoring: notify when specific output appears
clawhip run \
  --channel YOUR_CHANNEL_ID \
  --mention "@your-user-id" \
  --keywords "error,complete,failed,success" \
  -- bash my_deployment.sh

The --keywords flag is particularly useful โ€” clawhip watches stdout/stderr and pings you immediately when any of those strings appear, without waiting for the process to finish.

tmux Integration

For monitoring persistent tmux sessions (a common pattern for OpenClaw background work):

clawhip tmux new -s background-job \
  --channel YOUR_CHANNEL_ID \
  --mention "@your-user-id" \
  --keywords "error,PR created,complete" \
  -- 'source ~/.zshrc && openclaw gateway start --foreground'

This starts a tmux session, watches its output, and notifies you when any of the keywords appear. You don't need to manually tail logs or keep a terminal open.

Good Use Cases for clawhip

๐Ÿš€ Deployment monitoring

Notify when a Netlify/Vercel deploy completes or fails, without the agent needing to be involved.

๐Ÿ”„ Background script alerts

Long-running Python/bash scripts that should ping you on completion or error.

๐Ÿ“Š Cron job status

Send a notification when a scheduled cron job starts and finishes โ€” clean audit trail.

๐Ÿค– Sub-agent handoff

When one agent spins up a sub-agent, clawhip can notify you when the sub-agent completes without polluting the main session.

โš ๏ธ File system monitoring

Watch for file changes (new invoices, config changes, log growth) and notify immediately.

๐Ÿ’ฐ Cost threshold alerts

Wire it to a usage monitoring script โ€” notify when API spend crosses a threshold.

What clawhip Is Not

clawhip sends messages โ€” it doesn't receive or process them. It's a one-way notification pipe, not an alternative to OpenClaw's bidirectional agent sessions. If you need the agent to react to the notification (approve something, take action), that still needs to go through OpenClaw.

Think of clawhip as a lightweight sidecar: OpenClaw handles the intelligent, interactive work; clawhip handles the "just tell me when this thing happens" use cases that don't need model intelligence.

Pro setup: Use clawhip for all your status/monitoring notifications, and reserve your OpenClaw agent sessions for actual interactive work. This keeps conversation history clean, reduces token costs on long sessions, and makes agent responses sharper because the context isn't cluttered with status pings.

Project status: clawhip is new (published ~24 hours ago). Watch the GitHub repo for updates. The core functionality is solid; expect the configuration UX and channel support to expand quickly.