mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
fix: reseed Claude CLI session context on rotation closes #80905
This commit is contained in:
committed by
Peter Steinberger
parent
ce31fc91e1
commit
dd8aa1dcce
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user