$ REPRO_MODE=preserve-mtime node repro-1654.mjs (exit=1) [repro] claude binary: /home/sawyer/.local/share/claude/versions/2.1.234 [repro] claude --version: 2.1.234 (Claude Code) [repro] wrote /tmp/bb1654-claude-config-SSUT6T/.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 /api/hello authorization=(none) [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [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=11 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] (preserve-mtime) mtimeNs before=1787066343995921611 after=1787066343995921611 (unchanged) [repro] wrote /tmp/bb1654-claude-config-SSUT6T/.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-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [mock-api] POST /v1/messages?beta=true authorization=Bearer sk-ant-oat01-ACCOUNT-A-rate-limited [repro] turn 2 result: subtype=success is_error=true [repro] turn 2 (same process, after login): /v1/messages calls=11 tokens used=["sk-ant-oat01-ACCOUNT-A-rate-limited"] === Step 4: fresh process P2 (what a bb server restart gives you) === [mock-api] HEAD /api/hello 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-A-rate-limited" ], "turn3": [ "sk-ant-oat01-ACCOUNT-B-fresh-login" ] } BUG REPRODUCED: the live claude process kept sending token A after the credentials file changed to token B; only a new process picked up token B.