diff --git a/extensions/anthropic/cli-backend.ts b/extensions/anthropic/cli-backend.ts index 6141ac99df2..d62c84e3e61 100644 --- a/extensions/anthropic/cli-backend.ts +++ b/extensions/anthropic/cli-backend.ts @@ -63,6 +63,7 @@ export function buildAnthropicCliBackend(): CliBackendPlugin { imagePathScope: "workspace", sessionArg: "--session-id", sessionMode: "always", + reseedFromRawTranscriptWhenUncompacted: true, sessionIdFields: [...CLAUDE_CLI_SESSION_ID_FIELDS], systemPromptFileArg: "--append-system-prompt-file", systemPromptMode: "append", diff --git a/extensions/anthropic/cli-shared.test.ts b/extensions/anthropic/cli-shared.test.ts index 27d5f2589bd..7f4cf8455f9 100644 --- a/extensions/anthropic/cli-shared.test.ts +++ b/extensions/anthropic/cli-shared.test.ts @@ -261,6 +261,15 @@ describe("normalizeClaudeBackendConfig", () => { expect(backend.resolveExecutionArgs).toBe(resolveClaudeCliExecutionArgs); }); + it("opts bundled Claude CLI into bounded raw transcript reseed without disabling native resume", () => { + const backend = buildAnthropicCliBackend(); + + expect(backend.config.reseedFromRawTranscriptWhenUncompacted).toBe(true); + expect(backend.config.sessionMode).toBe("always"); + expect(backend.config.resumeArgs).toContain("--resume"); + expect(backend.config.resumeArgs).toContain("{sessionId}"); + }); + it("leaves claude cli subscription-managed, restricts setting sources, and clears inherited env overrides", () => { const backend = buildAnthropicCliBackend();