$ REPRO_CLAUDE_BIN=sdk-bundled node repro-1654.mjs (exit=0) [repro] claude binary: (SDK-bundled @anthropic-ai/claude-agent-sdk- CLI) [repro] wrote /tmp/bb1654-claude-config-qrZyhs/.credentials.json with sk-ant-oat01-ACCOUNT-A-rate-limited === Step 1: session P1 starts with token A (account A), first turn -> rate limited === [mock-api] HEAD / authorization=(none) [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [repro] turn 1 result: subtype=success is_error=true [repro] turn 1: /v1/messages calls=1 tokens used=["sk-ant-oat01-ACCOUNT-A-rate-limited"] === Step 2: user runs `claude login` on account B (credentials file rewritten with token B) === [repro] wrote /tmp/bb1654-claude-config-qrZyhs/.credentials.json with sk-ant-oat01-ACCOUNT-B-fresh-login === Step 3: retry on the SAME live process P1 (what bb does when you resend in the thread) === [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-B-fresh-login [repro] turn 2 result: subtype=success is_error=false [repro] turn 2 (same process, after login): /v1/messages calls=1 tokens used=["sk-ant-oat01-ACCOUNT-B-fresh-login"] === Step 4: fresh process P2 (what a bb server restart gives you) === [mock-api] HEAD / authorization=(none) [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-B-fresh-login [repro] turn 3 result: subtype=success is_error=false [repro] turn 3 (new process): /v1/messages calls=1 tokens used=["sk-ant-oat01-ACCOUNT-B-fresh-login"] === SUMMARY === { "turn1": [ "sk-ant-oat01-ACCOUNT-A-rate-limited" ], "turn2": [ "sk-ant-oat01-ACCOUNT-B-fresh-login" ], "turn3": [ "sk-ant-oat01-ACCOUNT-B-fresh-login" ] } NOT reproduced: the live process picked up the new token.