Repository navigation
Description
What happened
The Claude provider card on the macOS desktop app's local environment shows "Not authenticated · Claude Code is not authenticated. Run claude auth login and try again." Claude itself is authenticated and works fine: claude auth status in a terminal reports loggedIn: true. The message appears every time, not intermittently.
Diagnosis
The user authenticates Claude Code with a long-lived token exported from the shell profile (export CLAUDE_CODE_OAUTH_TOKEN=... in ~/.zshrc, created with claude setup-token). They do not keep a keychain OAuth login. In a terminal, claude auth status reports "authMethod": "oauth_token".
The desktop app is launched from the Dock and inherits launchd's environment, which does not include that variable. DesktopShellEnvironment hydrates only a fixed allowlist of names from the login shell (apps/desktop/src/shell/DesktopShellEnvironment.ts:76-99: PATH, locale, SSH_AUTH_SOCK, XDG_*, cert vars, and so on). CLAUDE_CODE_OAUTH_TOKEN (and ANTHROPIC_API_KEY) are not on that list, so the local backend spawns claude without any credential.
The capabilities probe then gets tokenSource: "none" with no email or subscription, and claudeAuthStatus() returns unauthenticated (apps/server/src/provider/ClaudeProvider.ts:176-190, message at :647).
Checked on the machine: the running desktop app process has no CLAUDE_CODE_OAUTH_TOKEN in its environment, and launchctl getenv CLAUDE_CODE_OAUTH_TOKEN is empty.
The status is technically correct for the backend's environment, but it is confusing. The user is logged in from every terminal, and the suggested remedy (claude auth login) is not what they use. Two possible improvements:
- Hydrate Claude auth env vars (
CLAUDE_CODE_OAUTH_TOKEN, and possiblyANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN) from the login shell, the same way PATH is hydrated. - Or, when the probe reports
tokenSource: "none"and the login shell defines one of those vars, say so ("found CLAUDE_CODE_OAUTH_TOKEN in your shell, but the desktop app does not inherit it") instead of suggestingclaude auth login.
main has no change to DesktopShellEnvironment.ts that adds these names (latest commits checked on 2026-10-21).
Steps to reproduce
- On macOS, make sure there is no valid Claude keychain login, and authenticate with
claude setup-token. - Add
export CLAUDE_CODE_OAUTH_TOKEN=<token>to~/.zshrconly. In a new terminal,claude auth statusshowsloggedIn: true,authMethod: oauth_token. - Launch T3 Code desktop from the Dock/Finder.
- Settings → Providers → Claude (local environment) shows "Not authenticated".
Version
T3 Code desktop (Beta) 0.1.1
Environment
macOS 26.7.1 (arm64), claude 2.1.306. Threads run against a remote t3 serve 0.1.1 on Linux, where Claude reports authenticated.
Evidence
# local desktop backend provider cache (~/.t3/caches/claudeAgent.json)
status = error
auth.status = unauthenticated
message = Claude Code is not authenticated. Run `claude auth login` and try again.
checkedAt = 2026-10-21T10:40:21.515Z
# same CLI, from an interactive terminal
$ claude auth status
{ "loggedIn": true, "authMethod": "oauth_token", "apiProvider": "firstParty", ... }
# desktop app process environment
CLAUDE_CODE_OAUTH_TOKEN present: no
launchctl getenv CLAUDE_CODE_OAUTH_TOKEN: (empty)Related issues
#2653 (Max OAuth "could not verify authentication status", closed: a different probe-parsing bug). #17936 (SSH-launched server on macOS can't read the login keychain: a different credential path). #14186 is the inverse case (false "authenticated"). None covers env-var tokens not reaching the desktop backend.
Fix applied or workaround
Disabled the Claude provider in the Mac's local environment; Claude is used only through the remote server. Alternative: launchctl setenv CLAUDE_CODE_OAUTH_TOKEN ... before launching the app (does not persist across reboots).
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity
juliusmarminge commentedon Oct 22, 2026
Confirmed on main with a real Bash login profile and the desktop environment service: PATH is imported, but
CLAUDE_CODE_OAUTH_TOKENis dropped. #23240 captures the token and preserves any inherited value. Focused tests: 14 passed. Before/after runtime evidence.Verified on Linux using isolated source at 8acbefefc5 and the fixed source. Native macOS Dock/zsh and provider-card authentication remain unverified here.
jpelayo commentedon Nov 7, 2026
Same here, connecting T3 0.1.3 to a remote macmini 27.2 over ssh:
"displayName": "Claude", "showInteractionModeToggle": true, "reportsContextWindow": true, "enabled": true, "installed": true, "version": "2.1.319", "status": "error", "auth": { "status": "unauthenticated" },Edit:
It all boils down to a remote session through SSH requiring some help to access the keychain. If claudecode cannot access the keychain, it stores credential in an env file (a bit exposed) so a relogin can fix this. If the user wants to use the remote keychain, the pair option in t3code can do it, or the following can be done to the remote machine:
add to
~/.zshrc
if [ -n "$SSH_CONNECTION" ]; then security unlock-keychain ~/Library/Keychains/login.keychain-db 2>/dev/null || true fi