mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
fix(adapter-utils): preserve empty Claude ACP background task override
Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2 files changed
+19
-1
No files matched your search
@@ -733,6 +733,24 @@ describe("shared ACPX engine runtime behavior", () => {
|
||||
expect(env).not.toContain("CLAUDE_CODE_DISABLE_BACKGROUND_TASKS='1'");
|
||||
});
|
||||
|
||||
it("preserves an explicit empty CLAUDE_CODE_DISABLE_BACKGROUND_TASKS value for Claude ACP runs", async () => {
|
||||
const root = await makeTempRoot();
|
||||
const stateDir = path.join(root, "state");
|
||||
const cwd = path.join(root, "worktree");
|
||||
await fs.mkdir(cwd, { recursive: true });
|
||||
|
||||
await runExecutor({
|
||||
agent: "claude",
|
||||
stateDir,
|
||||
cwd,
|
||||
env: { CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: "" },
|
||||
});
|
||||
|
||||
const env = await readSingleWrapperEnv(stateDir);
|
||||
expect(env).toMatch(/CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=\x27\x27/);
|
||||
expect(env).not.toMatch(/CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=\x271\x27/);
|
||||
});
|
||||
|
||||
it("does not inject CLAUDE_CODE_DISABLE_BACKGROUND_TASKS for non-Claude ACP runs", async () => {
|
||||
const root = await makeTempRoot();
|
||||
const stateDir = path.join(root, "state");
|
||||
|
||||
@@ -1117,7 +1117,7 @@ async function buildRuntime(input: {
|
||||
if (requestedModel && acpxAgent === "claude" && !env.ANTHROPIC_MODEL) {
|
||||
env.ANTHROPIC_MODEL = requestedModel;
|
||||
}
|
||||
if (acpxAgent === "claude" && !env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS) {
|
||||
if (acpxAgent === "claude" && !("CLAUDE_CODE_DISABLE_BACKGROUND_TASKS" in env)) {
|
||||
env.CLAUDE_CODE_DISABLE_BACKGROUND_TASKS = "1";
|
||||
}
|
||||
if (acpxAgent === "codex") {
|
||||
|
||||
Reference in new issue
Block a user