claudeclaw-group-agent

Installation
SKILL.md

ClaudeClaw Group Agent

Critical

  • Assistant vs. business (customer groups) — buildGroupSystemPrompt() injects CUSTOMER_WHATSAPP_TOOLING_FRAMING for every group_type = customer group so the model does not imply the brand lacks Facebook, WhatsApp, WordPress, etc. Tax4US retains extra [TAX4US CONTEXT] in group_agent_config.system_prompt_additions. finalizeGroupResponse runs applyOutputGuardrails(..., { customerWhatsAppGroup: true }), which may append a short EN+HE clarification if the reply still matches risky “no access” phrasing (see guardrails.appendCustomerToolingClarificationIfNeeded).
  • Entity groups require @-mention or /command — plain text in entity groups is SILENTLY LOGGED, not processed. Customer groups process ALL messages.
  • 7 entity groups seeded on startup from group-agent.ts: superseller, rensto, rabbi-dan-marco, yoram-friedman, shai-personal-brand, elite-pro-remodeling, gp-homes-repairs.
  • Many customer groups: Any paying tenant whose group is registered via bootstrapOnboardingGroup (services/onboarding/group-bootstrap.ts) gets groupType: "customer" — all messages in that group are processed (no @-mention gate). Tax4US is additionally seeded in group-agent.ts with a large system_prompt_additions block (white-label rules, cadence, “never say SuperSeller”); other customers typically use assembleProductPrompt + default registerGroup agent naming unless customized in DB.
  • Safety guards WA-SAFE-01 through WA-SAFE-07 protect against API drain — all in whatsapp.ts.
  • Anthropic SDK direct HTTP (@anthropic-ai/sdk v0.63.1) — client.messages.create() via claude-bridge.ts. NOT the @anthropic-ai/claude-agent-sdk subprocess anymore (see "Architecture change" below).
  • 2-minute timeout (WA-SAFE-04) via AbortController — aborts if exceeded.
  • Memory: claudeclaw_turns table, last 20 turns as proper messages[] array (enables Anthropic prompt caching). claudeclaw_sessions table is now unused — kept for backward compat with legacy session-based flows.

Architecture change (2026-04-16, commit 55275156)

Rewrote claude-bridge.ts from @anthropic-ai/claude-agent-sdk (subprocess spawn of claude CLI with stream-json IPC) to @anthropic-ai/sdk (direct HTTP to api.anthropic.com/v1/messages).

Why: under PM2 fork mode on RackNerd, the subprocess architecture silently dropped ANTHROPIC_API_KEY during the env: {...process.env} spread to the grandchild. CLI reported apiKeySource:"none" and exited code 1 on every WhatsApp message, 100% of the time, silently. Ben went from 2026-04-09 to 2026-04-16 without a single real reply.

Installs
1
First Seen
May 18, 2026