Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): keep one email in two workspaces as two accounts #17711

Mergedmaria-rcksmerged 9 commits intomain fromrefs/pull/17711/headmerged by maria-rcks View on GitHub

Showing 11 changed files with 24 additions and 3 deletions (loading 8).

x
0 of 11 viewed, 11 left
8 additions and 1 deletionapps/server/src/provider/Drivers/ClaudeDriver.tsModified
View file
@@ -203,7 +203,14 @@
capacity: 1,
timeToLive: CAPABILITIES_PROBE_TTL,
lookup: () =>
- probeClaudeCapabilities(effectiveConfig, processEnv, cwd).pipe(
+ Effect.all([
+ probeClaudeCapabilities(effectiveConfig, processEnv, cwd),
+ ClaudeResetCredits.readClaudeOrganizationId(accountConfigPath),
+ ]).pipe(
+ Effect.map(([capabilities, workspaceId]) =>
+ capabilities && workspaceId ? { ...capabilities, workspaceId } : capabilities,
+ ),
+ Effect.provideService(FileSystem.FileSystem, fileSystem),
Effect.provideService(Path.Path, path),
});
6 additions and 0 deletionsapps/server/src/provider/ClaudeProvider.tsModified
View file
@@ -262,6 +262,11 @@
​
type ClaudeCapabilitiesProbe = {
readonly email: string | undefined;
+ /**
+ * The organization UUID from the login's `.claude.json`. The driver reads it
+ * in the same cached probe, so it describes the same login as the rest.
+ */
+ readonly workspaceId?: string | undefined;
readonly subscriptionType: string | undefined;