claw + whip: Event-to-channel notification router — bypasses gateway sessions to avoid context pollution
claw + whip: Event-to-channel notification router — bypasses gateway sessions to avoid context pollution
⭐ Optional support: the interactive repo-local install paths (
./install.shandclawhip installfrom a clone) can offer to star this repo after a successful install whenghis installed and authenticated. Skip it with--skip-star-promptorCLAWHIP_SKIP_STAR_PROMPT=1. Community: Join the clawhip Discord at https://discord.gg/wSyUQYfhAw.
gajae-claw (clawhip) is the control plane for agents: route events from GitHub, Discord, tmux, and other tools to the right human or agent, record what happened, and separate automatic actions from approval-required actions.
Use clawhip when you have an event, a destination, and a policy for whether the next step can happen automatically or needs a human/operator approval. These recipes use placeholder channel IDs and names; replace them with your own public-safe values.
When GitHub reports a pull request event, route it to the project channel so the right maintainer sees it.
# ~/.clawhip/config.toml
[[routes]]
event = "github.pr-status-changed"
filter = { repo = "my-app" }
sink = "discord"
channel = "PROJECT_CHANNEL_ID"
format = "compact"Example event shape:
{
"source": "github",
"event": "pull_request.opened",
"repo": "my-app",
"pr": 42,
"action": "notify",
"target": "PROJECT_CHANNEL_ID"
}Result: clawhip records the routed event and posts a compact PR notification to the project channel.
Let routine CI status flow to the project channel, but reserve an escalation route for repeated failures. Your CI watcher or automation can emit the second-failure event after it observes two failed runs for the same PR or branch.
# ~/.clawhip/config.toml
[[routes]]
event = "github.ci-failed"
filter = { repo = "my-app" }
sink = "discord"
channel = "PROJECT_CHANNEL_ID"
format = "compact"
[[routes]]
event = "ci.failed-twice"
filter = { repo = "my-app" }
sink = "discord"
channel = "ESCALATION_CHANNEL_ID"
format = "alert"Example escalation payload:
{
"source": "ci-watcher",
"event": "ci.failed-twice",
"repo": "my-app",
"branch": "feature/auth-flow",
"summary": "CI failed twice on the same PR; test logs point at integration/auth_test.",
"action": "summarize_and_escalate",
"target": "ESCALATION_CHANNEL_ID"
}Result: normal failures stay low-noise; repeated failures get a short summary in the escalation channel.
Some requests should notify an operator instead of letting an agent act immediately. Send those events to an approval channel and keep the requested action in the message body.
# ~/.clawhip/config.toml
[[routes]]
event = "agent.approval-requested"
filter = { repo = "my-app" }
sink = "discord"
channel = "APPROVAL_CHANNEL_ID"
format = "alert"Example approval event:
{
"source": "agent",
"event": "agent.approval-requested",
"repo": "my-app",
"request": "merge PR #42 after checks pass",
"reason": "merge changes the shared branch and should be operator-approved",
"policy": "approval_required",
"action": "notify_operator",
"target": "APPROVAL_CHANNEL_ID"
}Result: clawhip records the request and alerts an operator; the agent waits for explicit approval before cleanup, merge, or config-changing work.
Human install pitch:
Just tag @openclaw and say: install this https://github.com/Yeachan-Heo/clawhipThen OpenClaw should:
install.shSKILL.md and attach the skill[providers.discord] is the preferred config surface, while legacy [discord] still loads.See ARCHITECTURE.md for the release architecture that ships in v0.3.0.
clawhip no longer treats provider-specific launch wrappers as the public integration surface. Codex and Claude own session launch plus hook registration; clawhip stays the routing, normalization, and delivery layer.
Shared v1 hook events:
SessionStartPreToolUsePostToolUseUserPromptSubmitStopLocal ingress for sample payloads and manual verification:
clawhip native hook --provider codex --file payload.json
clawhip native hook --provider claude --file payload.json
cat payload.json | clawhip native hook --provider codexRecommended installation model:
~/.clawhip/hooks/native-hook.mjs~/.codex/hooks.json or /.codex/hooks.json~/.claude/settings.json.clawhip/project.json.clawhip/hooks/ only for additive augmentation such as frontmatter or recent contextclawhip still pairs well with tmux when you want keyword/stale monitoring, but tmux is now optional and no longer the primary hook-registration surface.
For tmux-backed recovery into an already-running hooked session, use:
clawhip deliver --session --prompt "..." --max-enters 4clawhip deliver validates repo-local prompt-submit hook setup, confirms the target pane is an
active Codex/Claude (including OMC/OMX wrapper) session, then retries Enter until
.clawhip/state/prompt-submit.json changes or the bounded retry limit is reached.
clawhip now documents a Claw OS-style memory pattern where MEMORY.md is the hot pointer/index layer and detailed memory lives in structured filesystem shards under memory/.
Use this when you want:
Start here:
Runtime support now includes a small bootstrap/inspection surface:
# create a scaffold in the current repo
clawhip memory init --project clawhip --channel discord-alerts --agent codex
# inspect whether the expected files and directories exist
clawhip memory status --project clawhip --channel discord-alerts --agent codexclawhip memory init creates MEMORY.md, memory/README.md, a daily shard, a project shard,
topic files, and optional channel/agent shards without overwriting existing files unless you pass
--force.
clawhip now includes a simple plugins/ directory for tool-specific shell bridges.
Each plugin lives in its own subdirectory with:
plugin.toml for lightweight metadatabridge.sh for shell hook entrypointsBuilt-in starter plugins:
plugins/codex/plugins/claude-code/List installed plugins with:
clawhip plugin listOperational spec for OpenClaw / Clawdbot agents consuming this repo.
Repo role:
Attachment model:
SKILL.md = attach/install/usage instructions for OpenClaw / ClawdbotDefault daemon endpoint:
http://127.0.0.1:25294Primary install entrypoint:
@openclaw install Expected downstream automation behavior:
./install.shSKILL.mdReference repo URL:
https://github.com/Yeachan-Heo/clawhipRecommended: Create a dedicated Discord bot for clawhip. Do not reuse your Clawdbot / OpenClaw bot token.
clawhip sends high-volume notifications (commits, PRs, tmux keyword alerts, stale warnings). Using a separate bot keeps these cleanly separated from your AI chat bot.
[providers.discord]
token = "your-dedicated-clawhip-bot-token"
default_channel = "your-default-channel-id"
[dispatch]
routine_batch_window_secs = 5
ci_batch_window_secs = 300Legacy [discord] config is still accepted and normalized at load time.
[dispatch].routine_batch_window_secs controls the default Discord-only routine burst batch window. Leave it unset to keep the 5-second default, or set it to 0 to disable routine batching entirely. In v1, grouped routine bursts suppress route/event mentions for 2+ items, while explicit failure/stale/CI paths still bypass the routine batcher.
[dispatch].ci_batch_window_secs controls how long clawhip waits before flushing a GitHub CI batch summary. Leave it unset to keep the 30-second default, or increase it for longer workflows that finish jobs over several minutes.
Webhook mode works without a bot token.
Quick start:
clawhip setup --webhook "https://discord.com/api/webhooks/..."Bounded setup presets also support:
clawhip setup \
--bot-token "discord-bot-token" \
--default-channel "1234567890" \
--default-format alert \
--daemon-base-url "http://127.0.0.1:25294"clawhip setup stays non-interactive and intentionally limited to the supported presets:
To opt into the official GJC question bridge from a repository checkout, provide a destination channel (or explicitly reuse the configured default channel):
clawhip setup \
--question-channel "QUESTIONS_CHANNEL_ID" \
--question-mention ""
# Equivalent fallback form when [defaults].channel is already configured.
clawhip setup --question-fallbackThis setup path converges the setup-owned gjc-question websocket subscription and one
workflow.question route filtered by the current repository identity. It never edits an
existing workflow.gate route. Re-running setup updates those same named entries instead of
duplicating them. Question setup only owns the destination channel, optional mention, and
fallback-to-default choice; the subscription endpoint remains GJC_QUESTION_WS and is read
only by the daemon environment.
Route example:
[[routes]]
event = "tmux.keyword"
sink = "discord"
webhook = "https://discord.com/api/webhooks/..."Slack webhook routes work without a bot token.
No open issues yet, or sync has not completed.