diff --git a/src/cli/cron-cli/register.cron-edit.test.ts b/src/cli/cron-cli/register.cron-edit.test.ts index bc575c0f0d7..c420709deeb 100644 --- a/src/cli/cron-cli/register.cron-edit.test.ts +++ b/src/cli/cron-cli/register.cron-edit.test.ts @@ -55,4 +55,24 @@ describe("cron edit command", () => { }, ); }); + + it("does not imply announce mode for --no-best-effort-deliver alone", async () => { + const program = createCronProgram(); + + await program.parseAsync(["edit", "job-1", "--no-best-effort-deliver"], { from: "user" }); + + expect(callGatewayFromCli).toHaveBeenCalledWith( + "cron.update", + expect.objectContaining({ bestEffortDeliver: false }), + { + id: "job-1", + patch: { + payload: { kind: "agentTurn" }, + delivery: { + bestEffort: false, + }, + }, + }, + ); + }); }); diff --git a/src/cli/cron-cli/register.cron-edit.ts b/src/cli/cron-cli/register.cron-edit.ts index b7afc0d9bc9..2abb80d952a 100644 --- a/src/cli/cron-cli/register.cron-edit.ts +++ b/src/cli/cron-cli/register.cron-edit.ts @@ -299,7 +299,7 @@ export function registerCronEditCommand(cron: Command) { const delivery: Record = {}; if (hasDeliveryModeFlag) { delivery.mode = opts.announce || opts.deliver === true ? "announce" : "none"; - } else if (hasBestEffort) { + } else if (opts.bestEffortDeliver === true) { // Back-compat: toggling best-effort alone has historically implied announce mode. delivery.mode = "announce"; } diff --git a/src/cli/update-cli.option-collisions.test.ts b/src/cli/update-cli.option-collisions.test.ts index ebc3e737e1d..eb7649729cc 100644 --- a/src/cli/update-cli.option-collisions.test.ts +++ b/src/cli/update-cli.option-collisions.test.ts @@ -72,7 +72,7 @@ describe("update cli option collisions", () => { }, { name: "forwards parent-captured --json/--timeout to hidden `update finalize`", - argv: ["update", "finalize", "--json", "--timeout", "17", "--no-restart"], + argv: ["update", "finalize", "--json", "--timeout", "17"], assert: () => { expect(updateFinalizeCommand).toHaveBeenCalledTimes(1); const opts = firstCallOptions(updateFinalizeCommand); @@ -87,6 +87,17 @@ describe("update cli option collisions", () => { ).toBe(false); }, }, + { + name: "keeps hidden `update finalize --no-restart` as a no-op parity flag", + argv: ["update", "finalize", "--no-restart"], + assert: () => { + expect(updateFinalizeCommand).toHaveBeenCalledTimes(1); + const opts = firstCallOptions(updateFinalizeCommand); + expect( + (opts as { json?: boolean; timeout?: string; restart?: boolean } | undefined)?.restart, + ).toBe(false); + }, + }, { name: "forwards parent-captured --timeout to `update wizard`", argv: ["update", "wizard", "--timeout", "13"], diff --git a/src/cli/update-cli.ts b/src/cli/update-cli.ts index ddd194a19b7..387165c9325 100644 --- a/src/cli/update-cli.ts +++ b/src/cli/update-cli.ts @@ -131,7 +131,7 @@ ${theme.muted("Docs:")} ${formatDocsLink("/cli/update", "docs.openclaw.ai/cli/up channel: opts.channel as string | undefined, timeout: inheritedUpdateTimeout(opts, command), yes: Boolean(opts.yes), - restart: Boolean(opts.restart), + restart: false, }); } catch (err) { defaultRuntime.error(String(err));