Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a logged-out Claude CLI no longer reports as authenticated #15459

Mergedyordis(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/15459/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 152 additions and 0 deletions.

x
0 of 3 viewed, 3 left
1 addition and 0 deletionsapps/server/src/provider/ClaudeCapabilitiesProbe.test.tsModified
View file
@@ -279,6 +279,7 @@
email: "dev@example.com",
subscriptionType: "pro",
tokenSource: "oauth",
+ apiKeySource: undefined,
apiProvider: undefined,
slashCommands: [
54 additions and 0 deletionsapps/server/src/provider/ClaudeProvider.tsModified
View file
@@ -167,6 +167,38 @@
return apiProvider === "bedrock" ? { type: "bedrock", label: "Amazon Bedrock" } : undefined;
​
+/**
+ * Whether the SDK's account payload evidences a credential the CLI can use.
+ *
+ * The capability probe resolves for a logged-out CLI, so a completed probe only
+ * proves Claude Code started. `tokenSource: "none"` is the CLI reporting it
+ * found no token at all, and is the one shape that disproves authentication.
+ * Everything else either names a credential or, on a third-party backend, omits
+ * these fields by design because auth lives with AWS or gcloud instead.
+ *
+ * Silence is deliberately not disproof. Profile-authenticated installs report no
+ * token source, and a CLI too old to send an account payload reports nothing at
+ * all; treating either as logged out would sign working setups out of Settings.
+ * `apiKeySource: "none"` means no API key is in use, so it is no evidence either.
+ */