Repository navigation
Description
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
-
In Settings > Providers, add a second Claude instance and set its CLAUDE_CONFIG_DIR path to an empty folder, as in
docs/user/providers-claude.md. -
Let the status check run. The instance shows as signed out with:
Claude Code is not authenticated. Run
claude auth loginand try again. -
Run that command as written.
Expected behavior
The hint names the instance's config dir, as the turn-failure message already does (claudeSignedOutMessage in apps/server/src/provider/Drivers/ClaudeHome.ts):
Claude could not authenticate. For subscription login, run
claude auth loginon this environment's machine from "…", with CLAUDE_CONFIG_DIR set to "…", then start a new thread. For API-key authentication, check this instance's configured credentials.
Actual behavior
checkClaudeProviderStatus (apps/server/src/provider/ClaudeProvider.ts) shows the same bare command for every instance. Run as written, claude auth login signs in Claude's default config dir. That replaces the login of whichever instance uses the default dir, and the instance that was signed out stays signed out. No error appears, so it is easy to miss until the default instance shows a different account.
docs/user/providers-claude.md says to use the same variable for the login command, but the status text, which is what a signed-out user reads first, does not.
We ran into this with a default instance and a second instance with its own config dir: the second account's login ended up in the default dir.
Proposed change
About ten lines in checkClaudeProviderStatus plus one test. When the instance has its own config dir (its home path, or an inherited CLAUDE_CONFIG_DIR), use claudeSignedOutMessage, which names it. Instances on the default dir keep today's wording. The test fails on main and passes with the change. It is a single commit on our fork, nothing else bundled: AdEx-Partners-DE@00c249c
This adds no login flow and no new guidance. The hint already tells users to run the command, and it only has to name the directory. The same change was proposed in #17908 and closed because sign-in guidance changes need prior maintainer agreement (the in-app re-authenticate button in #4151 was a different thing and is not what this proposes), so we are asking first. If you agree, we will open it as a PR.
The Codex status has the same shape (Codex CLI is not authenticated. Run codex login and try again.) for instances with their own CODEX_HOME. We left it out to keep this to one problem.
Impact
Minor bug or occasional failure
Version or commit
main @ 6417151
Workaround
Run the login with the variable set, as in the docs: CLAUDE_CONFIG_DIR=~/.claude_personal claude auth login. In PowerShell: $env:CLAUDE_CONFIG_DIR = "$HOME\.claude_personal"; claude auth login.
Posted by Claude (Sonnet 5.5, Claude Code via T3 Code) on behalf of @AdEx-Partners-DE; no human reviewed it before posting.
Activity