[BUG] /account shows 'Not authenticated' in older windows after another window logs in/out, while Usage bars still populate
_Filed via Claude Code by ggapearl — bilingual report (English first, Korean below)._
Summary
When I switch Claude AI accounts (or log out / re-log in) in a newer Claude Code window, older already-running windows continue to function because their auth token is cached in memory — but /account in those older windows reports "Not authenticated" while the Usage panel of the same dialog still shows real, accurate percentages.
This is internally contradictory: the same dialog simultaneously claims the user is unauthenticated AND is consuming a measurable amount of session/weekly quota.
Steps to Reproduce
- Open Claude Code Window A in the VS Code extension and log in with Account X (Pro plan).
- Open a second Claude Code Window B and either (a) log in with Account Y, or (b) log out, or (c) re-authenticate (any action that rewrites the on-disk credential store).
- Return to Window A and continue working — chats and tool calls keep succeeding.
- In Window A, run
/account:
Auth method: Not authenticatedUSAGE→Session (5hr): 36% (filled progress bar)USAGE→Weekly (7 day): 13% (filled progress bar)
Meanwhile in Window B, /account correctly shows Auth method: Claude AI, the current email, plan, and organization.
Screenshot (left = freshly opened window, right = older session-in-progress window):
<!-- The screenshot was shared in the originating Claude Code conversation; happy to upload if needed. -->
Expected Behavior
One of the following, in order of preference:
/accountreflects the in-memory session that is actually serving this window's API calls — so the displayed identity matches whichever account is being charged for the visible usage bars.- If the on-disk credential store has diverged from this window's in-memory state, surface an explicit warning in the dialog, e.g.:
> _"Credentials in the shared store were modified by another session. This window is still authenticated as <X> in memory; new windows / token refreshes will use <Y>. Run /logout then /login to sync."_
- At minimum, don't show contradictory state: if
Auth methodis "Not authenticated," thenUsageshould not display a populated, attributable progress bar.
Actual Behavior
/account shows "Not authenticated" while the same dialog continues to display populated Session (5hr) and Weekly (7 day) usage bars. There is no indication of which account is actually being charged for the in-flight session.
Impact
- Users who alternate accounts (work / personal, or testing multiple plans) cannot verify which account a given window is charging.
- When the cached in-memory session token eventually expires, the silent refresh will likely fail mid-task because the on-disk credentials belong to a different account.
- Contradictory state ("Not authenticated" + visible usage) undermines trust in the displayed account/usage panel — users can no longer rely on
/accountas a source of truth. - This is the exact failure mode that makes broader complaints like #22872 ("[BUG] Switching between personal and work Claude Code accounts is abysmal") so frustrating: even after a successful switch, older windows mislead the user about who is being billed.
Suggested Improvements
- Source
/accountfrom the live session credential, not from re-reading the on-disk credential store. The session token is what actually authenticates API calls; the dialog should describe that. - Detect credential-store divergence on session start (or periodically) and surface a clear, dismissible warning banner. Don't silently rely on stale in-memory state.
- On token-refresh failure due to mismatched on-disk credentials, prompt the user to re-authenticate gracefully instead of erroring mid-call.
- (Optional) Add a per-window account indicator in the status line / TUI header so the user can see at a glance which account a given window is using — this also helps with the "named profiles" feature requests (#27359, #56232).
Environment
- OS: Windows 10 Pro (build 19045)
- Claude Code: VS Code native extension
- Plan: Claude Pro (account
ggapearl@gmail.com) - Repro setup: Two simultaneously open Claude Code windows, alternating logins with a secondary Anthropic account.
Related Issues
- #22872 — broader complaint about account switching UX (this issue is one specific failure mode within that area).
- #56232, #52793, #27359 — feature requests for first-class multi-account support / named profiles, which would also benefit from the divergence-detection logic suggested above.
---
한국어 (Korean translation)
요약
새로 연 Claude Code 창에서 계정을 전환(또는 로그아웃/재로그인)하면, 이전부터 켜져 있던 창들은 메모리에 캐시된 인증 토큰으로 계속 정상 동작합니다. 그런데 그 이전 창에서 /account를 실행하면 같은 다이얼로그가 "Not authenticated"라고 표시하면서도 Usage 진행률은 실제 값(예: Session 36%, Weekly 13%)을 표시합니다.
같은 패널 안에서 "인증 안 됨" + "퀀텀 사용량은 정확히 측정 중"이라는 모순된 상태가 동시에 보입니다.
재현 방법
- VS Code 확장에서 Claude Code 창 A를 열고 계정 X(Pro)로 로그인.
- 두 번째 창 B를 열고 (a) 계정 Y로 로그인하거나 (b) 로그아웃하거나 (c) 재인증 — 즉 디스크상의 자격증명 저장소를 갱신하는 어떤 동작이든 수행.
- 창 A로 돌아와서 작업 계속 — 채팅·툴 호출 모두 정상 작동.
- 창 A에서
/account실행 시:
Auth method: Not authenticatedUSAGE→Session (5hr): 36% (진행바 채워짐)USAGE→Weekly (7 day): 13% (진행바 채워짐)
반면 창 B의 /account는 Auth method: Claude AI, 이메일, 플랜, 조직을 정확히 표시.
기대 동작
선호 순서:
/account가 해당 창의 API 호출을 실제로 인증하고 있는 in-memory 세션을 표시 — 화면의 사용량 진행바를 차감하는 계정과 일치해야 함.- 디스크상 자격증명과 메모리상 세션이 어긋난 상태가 감지되면 다이얼로그에 명시적 경고를 표시 (예: _"다른 세션이 자격증명을 변경했습니다. 이 창은 메모리상 <X> 계정으로 동작 중이며, 새 창/토큰 갱신은 <Y>를 사용합니다. 동기화하려면
/logout후/login실행."_). - 최소한 모순된 상태를 표시하지 않아야 함 —
Auth method가 "Not authenticated"인데 Usage가 차오른 진행바를 표시하는 건 불가능한 조합.
실제 동작
/account가 "Not authenticated"라고 표시하면서 동시에 Session (5hr)과 Weekly (7 day) 진행바를 정확한 값으로 표시. 어떤 계정이 차감되고 있는지 확인할 방법 없음.
영향
- 업무/개인 계정을 번갈아 쓰거나 여러 플랜을 테스트하는 사용자는 현재 창이 어느 계정에 청구되고 있는지 확인 불가.
- 메모리상 세션 토큰이 만료되면 디스크상 자격증명이 다른 계정이라 silent refresh가 작업 도중 실패할 가능성.
- "Not authenticated" + "사용량 표시"라는 모순된 상태는
/account다이얼로그 자체의 신뢰성을 무너뜨림. - #22872 같은 광범위한 계정 전환 불만의 핵심 원인 중 하나 — 전환 성공 후에도 옛 창들이 사용자에게 거짓 정보를 보여줌.
개선 제안
/account를 디스크 자격증명이 아닌 라이브 세션 자격증명에서 읽어오기. API를 실제로 인증하는 토큰을 표시하는 게 맞음.- 세션 시작 시(또는 주기적으로) 자격증명 저장소와 메모리 상태의 불일치 감지 → 명확한 경고 배너.
- 토큰 갱신 실패가 자격증명 불일치 때문이라면 작업 중간에 에러 내지 말고 재인증을 우아하게 유도.
- (선택) 창별 계정 표시를 상태줄/TUI 헤더에 추가 — #27359, #56232에서 요청된 "named profile" 기능에도 도움.
환경
- OS: Windows 10 Pro (build 19045)
- Claude Code: VS Code 네이티브 확장
- 플랜: Claude Pro (계정
ggapearl@gmail.com) - 재현 환경: 두 개의 Claude Code 창을 동시에 열고 보조 Anthropic 계정과 번갈아 로그인.
관련 이슈
- #22872 — 계정 전환 UX 전반에 대한 불만 (이 이슈는 그 안의 구체적 실패 모드 중 하나).
- #56232, #52793, #27359 — 다계정/네임드 프로필 기능 요청. 위 1·2번 개선이 이 기능에도 토대가 됨.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗