Skip to content

[Bug]: Claude thread stays logged out after re-login until its CLI process is reaped #9607

Description

@robertnisipeanu

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Use a thread on the Claude provider until the Claude OAuth session expires. The turn ends with Failed to authenticate: OAuth session expired and could not be refreshed.
  2. In a terminal, run claude and /login (or claude auth login) and complete the login.
  3. Return to the same T3 thread and send another message.

Expected behavior

The thread picks up the refreshed credentials and the turn runs.

Actual behavior

Every message in that thread replies Not logged in · Please run /login, even though the login already succeeded. A new thread works immediately. The broken thread only recovers after the idle-session reaper kills its CLI process (up to 30 minutes plus the 5 minute sweep) or after the user stops the thread.

Cause: T3 keeps one long-lived Claude CLI process per thread, and the CLI loads OAuth credentials once at startup. Once the credentials it holds expire, the process reports authentication_failed on every turn. T3 does not treat that as a reason to end the session, so the same process keeps being reused.

Impact

Major degradation or frequent failure

Version or commit

main @ 4e89d74

Environment

macOS 26.6.0 (Darwin 25.6.0) arm64, Claude provider on claude.ai OAuth

Logs or stack traces

{"type":"assistant","error":"authentication_failed", ...}   # content: "Not logged in · Please run /login"
{"type":"result","subtype":"success","is_error":true, ...}

Screenshots, recordings, or supporting files

Thread replying Not logged in after the user already ran /login

Workaround

Stop the thread, or start a new thread, after logging in again.

Related: #7878 (how the failure is rendered), #6022 (one cause of the expiry).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions