[BUG] incorrectly showing the login message

Resolved 💬 3 comments Opened Jul 25, 2025 by floydnoel Closed Jan 4, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: claude code current
  • Operating System: macOS current
  • Terminal: VSCode terminal

Bug Description

Title: Terminal history and context wiped after forced re-login that wasn't needed

Description:
Was in the middle of a productive coding session with Claude Code when I got an error saying I wasn't logged in (even though I was). When I tried to continue, it forced me to
restart the session, which:

  1. Wiped the entire terminal history and conversation context
  2. Lost all the todos that were being tracked
  3. Lost all the context about what we were working on
  4. The login "error" was bogus - I was already logged in

This is a critical UX issue because:

  • Hours of conversation context just disappear
  • No way to recover the todo list or previous discussion
  • No warning that restarting will delete everything
  • The login error itself was incorrect

Expected behavior:

  • If a re-login is needed, preserve the terminal history and context
  • Provide a way to export/save context before forcing a restart
  • Don't throw login errors when the user is actually logged in
  • At minimum, warn users that continuing will lose all their work context

Impact: Lost significant work context and todo tracking mid-session

Steps to Reproduce

  1. Login
  2. Work for a while
  3. Come back the next morning
  4. Have a 'you aren't logged in message' from a single missed API call (not sure how, maybe one expired token)
  5. Try to login
  6. Notice that the whole entire terminal history is wiped for a full screen login graphic
  7. Can't get your context back because the login screen blew it away

Expected Behavior

Let me retry and it would have noticed i was logged in. OR, don't make the login function so sucky to wipe the whole terminal history. OR, allow not logged in users to do a context save of some sort. I'm sure i could come up with some more ideas if you need, there's lots of ways to avoid this.

Actual Behavior

got wrecked, lost my place in the middle of a sprint that i didn't document, so I have to recreate everything

Additional Context

hire me to fix claude code ig

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗