Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

fix(ops-daemon): Linux correctness — OAuth from credentials file + stop re-enabling masked wacli-keepalive (#418)

Aurora Capitala7cf5a3f7dde
diff --git a/claude-ops/scripts/ops-daemon.sh b/claude-ops/scripts/ops-daemon.sh
index 7295ec42..720d1177 100755
--- a/claude-ops/scripts/ops-daemon.sh
+++ b/claude-ops/scripts/ops-daemon.sh
@@ -1359,29 +1359,15 @@ Unit=claude-ops.service
WantedBy=timers.target
EOF
- # wacli-keepalive: persistent service (Restart=always) — no timer needed.
- cat > "$unit_dir/claude-ops-wacli-keepalive.service" <<EOF
-[Unit]
-Description=claude-ops wacli keepalive
-After=default.target
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/env bash $OPS_KEEPALIVE_SCRIPT
-Restart=always
-RestartSec=60
-StandardOutput=append:$LOG_DIR/wacli-launchd-stdout.log
-StandardError=append:$LOG_DIR/wacli-launchd-stderr.log
-Environment=HOME=$HOME
-
-[Install]
-WantedBy=default.target
-EOF
+ # wacli-keepalive was decommissioned in v2.0.3 — on Linux the WhatsApp stream
+ # is owned by whatsapp-bridge.service (whatsmeow/Baileys MCP). Do NOT write or
+ # enable claude-ops-wacli-keepalive.service here: it is masked on existing
+ # installs, and re-enabling a masked unit spams the journal with
+ # "Failed to enable unit ... is masked" on every daemon tick.
systemctl --user daemon-reload
systemctl --user enable --now claude-ops.timer
- systemctl --user enable --now claude-ops-wacli-keepalive.service || true
- log "INSTALL(systemd): enabled claude-ops.timer + claude-ops-wacli-keepalive.service"
+ log "INSTALL(systemd): enabled claude-ops.timer"
}
uninstall_daemon_systemd() {
@@ -1570,15 +1556,7 @@ _ensure_all_services_systemd() {
command -v systemctl >/dev/null 2>&1 || return 0
local repaired=0
- # Check wacli-keepalive systemd unit
- if ! systemctl --user is-active claude-ops-wacli-keepalive.service &>/dev/null; then
- log "ENSURE: claude-ops-wacli-keepalive.service not active — restarting"
- systemctl --user restart claude-ops-wacli-keepalive.service 2>/dev/null || {
- # Unit may not exist — trigger full install
- install_daemon_systemd
- }
- (( repaired++ )) || true
- fi
+ # wacli-keepalive intentionally omitted — decommissioned (see install_daemon_systemd).
# Check timer
if ! systemctl --user is-active claude-ops.timer &>/dev/null; then
diff --git a/claude-ops/scripts/ops-memory-extractor.sh b/claude-ops/scripts/ops-memory-extractor.sh
index 124adb89..9557ad2b 100755
--- a/claude-ops/scripts/ops-memory-extractor.sh
+++ b/claude-ops/scripts/ops-memory-extractor.sh
@@ -82,6 +82,31 @@ resolve_auth() {
OPS_AUTH_EXTRA_HEADERS=()
# ─ Try Claude Code OAuth first ─
+ # Linux: the OAuth blob lives in ~/.claude/.credentials.json (no macOS Keychain).
+ local creds_file="${HOME}/.claude/.credentials.json"
+ if [[ -r "${creds_file}" ]]; then
+ local ftoken
+ ftoken=$(python3 -c "
+import json, sys, time
+try:
+ d = json.load(open('${creds_file}'))
+ o = d.get('claudeAiOauth') or {}
+ tok = o.get('accessToken') or ''
+ exp = o.get('expiresAt') or 0
+ if tok and exp > int(time.time() * 1000) + 60000:
+ print(tok)
+except Exception:
+ pass
+" 2>/dev/null || true)
+ if [[ -n "${ftoken}" ]]; then
+ OPS_AUTH_HEADER="Authorization: Bearer ${ftoken}"
+ OPS_AUTH_MODE="oauth"
+ OPS_AUTH_EXTRA_HEADERS=(-H "anthropic-beta: oauth-2025-04-20")
+ log "Auth: Claude Code OAuth (~/.claude/.credentials.json — subscription, no per-token billing)"
+ return 0
+ fi
+ fi
+
if command -v security &>/dev/null; then
local blob token
blob=$(security find-generic-password -s "Claude Code-credentials" -w 2>/dev/null || true)