Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): name the expired login or usage limit instead of a generic API error #10321

Mergedvitalyiegorov(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/10321/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 30 additions and 0 deletions (loading 2).

x
0 of 4 viewed, 4 left
12 additions and 0 deletionsapps/server/src/provider/Drivers/ClaudeHome.test.tsModified
View file
@@ -6,6 +6,7 @@
import * as Path from "effect/Path";
​
import {
+ claudeSignedOutMessage,
makeClaudeCapabilitiesCacheKey,
makeClaudeContinuationGroupKey,
makeClaudeEnvironment,
@@ -39,6 +40,17 @@
}),
);
​
+ it("points the signed-out hint at the configured Claude home", () => {
+ expect(claudeSignedOutMessage({ configDir: undefined, cwd: "/synthetic" })).toContain(
+ "run `claude auth login`",
+ );
+ const configDir = "/synthetic/Claude work's $literal";
+ const message = claudeSignedOutMessage({ configDir, cwd: "/synthetic/project" });
+ expect(message).toContain(`CLAUDE_CONFIG_DIR set to "${configDir}"`);
+ expect(message).not.toContain("CLAUDE_CONFIG_DIR=");
+ expect(message).toContain("then start a new thread");
+ });
+​
it.effect("separates capability probes by cwd", () =>
Effect.gen(function* () {
const config = { binaryPath: "claude", homePath: "" };
18 additions and 0 deletionsapps/server/src/provider/Drivers/ClaudeHome.tsModified
View file