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.
Shell agent-teamsai-agentai-automationanthropicautonomous-agentawsbusiness-operationsclaudeclaude-codeclaude-code-plugindevopsecommerceinbox-zeroklaviyomarketingmcpmorning-briefingpr-automationshopifyterminal
fix(account-rotation): repair post-rotation bg-session refresh (homedir import + respawn-id from content, not PID) (#559)
Aurora Capitalf91b24ca6c13
diff --git a/claude-ops/scripts/account-rotation/bg-respawn.mjs b/claude-ops/scripts/account-rotation/bg-respawn.mjsindex 38bff490..b5de410a 100644--- a/claude-ops/scripts/account-rotation/bg-respawn.mjs+++ b/claude-ops/scripts/account-rotation/bg-respawn.mjs@@ -89,7 +89,11 @@ export function listLiveBgSessions() {const pid = Number(s.pid) || 0;if (!pidAlive(pid)) continue;if (pid === process.pid || pid === process.ppid) continue; // never respawn ourselves- const id = s.id || f.replace(/\.json$/, '');+ // Session-state files are PID-named, but `claude respawn` needs the job/+ // session id, NOT the PID. Resolve from file CONTENT (OS-agnostic, no+ // reliance on the PID filename): prefer jobId (short id in the fleet UI),+ // then full sessionId, then any explicit id; filename is last-resort only.+ const id = s.jobId || s.sessionId || s.id || f.replace(/\.json$/, '');out.push({ id, pid, status: s.status || 'unknown' });} catch {}}diff --git a/claude-ops/scripts/account-rotation/rotate.mjs b/claude-ops/scripts/account-rotation/rotate.mjsindex 306a6945..f2098863 100644--- a/claude-ops/scripts/account-rotation/rotate.mjs+++ b/claude-ops/scripts/account-rotation/rotate.mjs@@ -43,7 +43,7 @@ import { persistBedrockClaudeSettings } from './claude-settings-mode.mjs';import { join, dirname } from 'path';import { fileURLToPath } from 'url';import { execSync, execFileSync, spawnSync, spawn } from 'child_process';-import { tmpdir } from 'os';+import { tmpdir, homedir } from 'os';import { createHmac } from 'node:crypto';import { askAIBrain, executeAIAction, AI_BRAIN_MAX_DECISIONS, scrapeBillingState } from './ai-brain.mjs';import { destinationUtilHardBlock } from './rotation-policy.mjs';