Skip to content

Commit 32b16c1

Browse files
authored
fix: Remove backup auth check from new session (#544)
This was an optimistic check, and causes issues when users are using alternate logins. Just removing
1 parent 9fb631f commit 32b16c1

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/acp-agent.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import {
6161
import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
6262
import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
6363
import { randomUUID } from "node:crypto";
64-
import * as fs from "node:fs";
6564
import * as os from "node:os";
6665
import * as path from "node:path";
6766
import packageJson from "../package.json" with { type: "json" };
@@ -452,14 +451,6 @@ export class ClaudeAcpAgent implements Agent {
452451
}
453452

454453
async newSession(params: NewSessionRequest): Promise<NewSessionResponse> {
455-
if (
456-
!this.gatewayAuthMeta &&
457-
fs.existsSync(path.resolve(os.homedir(), ".claude.json.backup")) &&
458-
!fs.existsSync(path.resolve(os.homedir(), ".claude.json"))
459-
) {
460-
throw RequestError.authRequired();
461-
}
462-
463454
const response = await this.createSession(params, {
464455
// Revisit these meta values once we support resume
465456
resume: (params._meta as NewSessionMeta | undefined)?.claudeCode?.options?.resume,

0 commit comments

Comments
 (0)