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
This commit is contained in:
Ben Brandt
2026-04-13 19:00:55 +02:00
committed by GitHub
parent 9fb631f5d7
commit 32b16c1ad9

View File

@@ -61,7 +61,6 @@ import {
import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
import { randomUUID } from "node:crypto";
import * as fs from "node:fs";
import * as os from "node:os";
import * as path from "node:path";
import packageJson from "../package.json" with { type: "json" };
@@ -452,14 +451,6 @@ export class ClaudeAcpAgent implements Agent {
}
async newSession(params: NewSessionRequest): Promise<NewSessionResponse> {
if (
!this.gatewayAuthMeta &&
fs.existsSync(path.resolve(os.homedir(), ".claude.json.backup")) &&
!fs.existsSync(path.resolve(os.homedir(), ".claude.json"))
) {
throw RequestError.authRequired();
}
const response = await this.createSession(params, {
// Revisit these meta values once we support resume
resume: (params._meta as NewSessionMeta | undefined)?.claudeCode?.options?.resume,