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(auth): release reauth lock after runs (#745)

Aurora Capital21d759cab3bf
diff --git a/claude-ops/scripts/account-rotation/magic-link-autoloop.sh b/claude-ops/scripts/account-rotation/magic-link-autoloop.sh
index 8696b77d..6bd12382 100755
--- a/claude-ops/scripts/account-rotation/magic-link-autoloop.sh
+++ b/claude-ops/scripts/account-rotation/magic-link-autoloop.sh
@@ -54,4 +54,4 @@ if [[ -f "$LOG" ]]; then
fi
fi
-exec "$NODE" "$SCRIPT_DIR/magic-link-autoloop.mjs" "$@" >>"$LOG" 2>&1
+"$NODE" "$SCRIPT_DIR/magic-link-autoloop.mjs" "$@" >>"$LOG" 2>&1
diff --git a/claude-ops/scripts/account-rotation/rotate.mjs b/claude-ops/scripts/account-rotation/rotate.mjs
index 1b69adca..bdecb27f 100644
--- a/claude-ops/scripts/account-rotation/rotate.mjs
+++ b/claude-ops/scripts/account-rotation/rotate.mjs
@@ -2599,9 +2599,8 @@ async function runAuthFlow(driver, account) {
.innerText()
.catch(() => '')) ||
'';
- const displayedCode = /use verification code to continue/i.test(displayText)
- ? displayText.match(/\b(\d{6})\b/)?.[1]
- : null;
+ const displayUrl = await driver.currentUrl().catch(() => '');
+ const displayedCode = displayUrl.includes('/magic-link') ? displayText.match(/\b(\d{6})\b/)?.[1] : null;
if (displayedCode && driver._authUrl) {
log('[magic-link] Captured displayed verification code — returning to sign-in');
await driver.goto(driver._authUrl).catch(() => {});
@@ -2705,7 +2704,8 @@ async function runAuthFlow(driver, account) {
async function finishDisplayedClaudeVerificationCode() {
if (!driver.readPageText || !driver._authUrl) return false;
const text = await driver.readPageText().catch(() => '');
- if (!/use verification code to continue/i.test(text)) return false;
+ const url = await driver.currentUrl().catch(() => '');
+ if (!url.includes('/magic-link')) return false;
const code = text.match(/\b(\d{6})\b/)?.[1];
if (!code) return false;
log('[magic-link] Captured displayed verification code — returning to sign-in');