惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Jina AI
Jina AI
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
美团技术团队
腾讯CDC
博客园 - Franky
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
博客园_首页
V
V2EX
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(cron): stop forcing message tool for delivery · openc...
bryanpearson · 2026-05-26 · via Recent Commits to openclaw:main

@@ -204,7 +204,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

204204

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

205205

expectEmbeddedRunFields({

206206

disableMessageTool: false,

207-

forceMessageTool: true,

207+

forceMessageTool: false,

208208

});

209209

}

210210

@@ -229,7 +229,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

229229

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

230230

expectEmbeddedRunFields({

231231

disableMessageTool: false,

232-

forceMessageTool: true,

232+

forceMessageTool: false,

233233

messageChannel: "messagechat",

234234

messageTo: "123",

235235

currentChannelId: "123",

@@ -335,7 +335,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

335335

timeoutMs: 60_000,

336336

suppressExecNotifyOnExit: true,

337337

sourceDelivery: createSourceDeliveryPlan({

338-

owner: "message_tool_then_direct_fallback",

338+

owner: "direct_fallback",

339339

reason: "cron_announce",

340340

target: {

341341

channel: resolvedDelivery.channel ?? "messagechat",

@@ -344,7 +344,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

344344

threadId: resolvedDelivery.threadId,

345345

},

346346

messageToolEnabled: true,

347-

messageToolForced: true,

347+

messageToolForced: false,

348348

directFallback: true,

349349

}),

350350

skillsSnapshot: emptySkillsSnapshot,

@@ -388,7 +388,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

388388

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

389389

const embeddedRun = expectEmbeddedRunFields({

390390

disableMessageTool: false,

391-

forceMessageTool: true,

391+

forceMessageTool: false,

392392

});

393393

expect(embeddedRun.messageChannel).toBeUndefined();

394394

expect(embeddedRun.messageTo).toBeUndefined();

@@ -425,7 +425,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

425425

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

426426

expectEmbeddedRunFields({

427427

disableMessageTool: false,

428-

forceMessageTool: true,

428+

forceMessageTool: false,

429429

messageChannel: "topicchat",

430430

messageTo: "room#42",

431431

messageThreadId: 42,

@@ -568,7 +568,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

568568

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

569569

const embeddedRun = expectEmbeddedRunFields({

570570

disableMessageTool: false,

571-

forceMessageTool: true,

571+

forceMessageTool: false,

572572

});

573573

expect(embeddedRun.messageChannel).toBeUndefined();

574574

expect(embeddedRun.messageTo).toBeUndefined();

@@ -643,7 +643,7 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

643643

});

644644

});

645645646-

it("keeps cron announce source replies message-tool-only", async () => {

646+

it("keeps cron announce delivery out of message-tool-only source replies", async () => {

647647

mockRunCronFallbackPassthrough();

648648

resolveCronDeliveryPlanMock.mockReturnValue(makeAnnounceDeliveryPlan());

649649

@@ -654,8 +654,8 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

654654655655

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

656656

expectEmbeddedRunFields({

657-

sourceReplyDeliveryMode: "message_tool_only",

658-

forceMessageTool: true,

657+

sourceReplyDeliveryMode: undefined,

658+

forceMessageTool: false,

659659

messageChannel: "messagechat",

660660

messageTo: "123",

661661

currentChannelId: "123",

@@ -1157,6 +1157,103 @@ describe("runCronIsolatedAgentTurn delivery instruction", () => {

11571157

expect(prompt).toContain("Return your response as plain text");

11581158

});

115911591160+

it("does not prompt for the message tool when toolsAllow is explicitly empty", async () => {

1161+

mockRunCronFallbackPassthrough();

1162+

resolveCronDeliveryPlanMock.mockReturnValue({

1163+

requested: true,

1164+

mode: "announce",

1165+

channel: "messagechat",

1166+

to: "123",

1167+

});

1168+1169+

await runCronIsolatedAgentTurn({

1170+

...makeParams(),

1171+

job: makeMessageToolPolicyJob(

1172+

{ mode: "announce", channel: "messagechat", to: "123" },

1173+

{ kind: "agentTurn", message: "send a message", toolsAllow: [] },

1174+

),

1175+

});

1176+1177+

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

1178+

expectEmbeddedRunFields({

1179+

disableMessageTool: false,

1180+

forceMessageTool: false,

1181+

toolsAllow: [],

1182+

});

1183+

const prompt = expectEmbeddedRunPrompt();

1184+

expect(prompt).not.toContain("Use the message tool");

1185+

expect(prompt).toContain("Return your response as plain text");

1186+

});

1187+1188+

it("prompts for the message tool when toolsAllow uses wildcard access", async () => {

1189+

mockRunCronFallbackPassthrough();

1190+

resolveCronDeliveryPlanMock.mockReturnValue({

1191+

requested: true,

1192+

mode: "announce",

1193+

channel: "messagechat",

1194+

to: "123",

1195+

});

1196+1197+

await runCronIsolatedAgentTurn({

1198+

...makeParams(),

1199+

job: makeMessageToolPolicyJob(

1200+

{ mode: "announce", channel: "messagechat", to: "123" },

1201+

{ kind: "agentTurn", message: "send a message", toolsAllow: ["*"] },

1202+

),

1203+

});

1204+1205+

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

1206+

const prompt = expectEmbeddedRunPrompt();

1207+

expect(prompt).toContain("Use the message tool");

1208+

expect(prompt).toContain("will be delivered automatically");

1209+

});

1210+1211+

it("prompts for the message tool when toolsAllow uses a group containing message", async () => {

1212+

mockRunCronFallbackPassthrough();

1213+

resolveCronDeliveryPlanMock.mockReturnValue({

1214+

requested: true,

1215+

mode: "announce",

1216+

channel: "messagechat",

1217+

to: "123",

1218+

});

1219+1220+

await runCronIsolatedAgentTurn({

1221+

...makeParams(),

1222+

job: makeMessageToolPolicyJob(

1223+

{ mode: "announce", channel: "messagechat", to: "123" },

1224+

{ kind: "agentTurn", message: "send a message", toolsAllow: ["group:messaging"] },

1225+

),

1226+

});

1227+1228+

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

1229+

const prompt = expectEmbeddedRunPrompt();

1230+

expect(prompt).toContain("Use the message tool");

1231+

expect(prompt).toContain("will be delivered automatically");

1232+

});

1233+1234+

it("prompts for the message tool when toolsAllow names message with different casing", async () => {

1235+

mockRunCronFallbackPassthrough();

1236+

resolveCronDeliveryPlanMock.mockReturnValue({

1237+

requested: true,

1238+

mode: "announce",

1239+

channel: "messagechat",

1240+

to: "123",

1241+

});

1242+1243+

await runCronIsolatedAgentTurn({

1244+

...makeParams(),

1245+

job: makeMessageToolPolicyJob(

1246+

{ mode: "announce", channel: "messagechat", to: "123" },

1247+

{ kind: "agentTurn", message: "send a message", toolsAllow: ["MESSAGE"] },

1248+

),

1249+

});

1250+1251+

expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);

1252+

const prompt = expectEmbeddedRunPrompt();

1253+

expect(prompt).toContain("Use the message tool");

1254+

expect(prompt).toContain("will be delivered automatically");

1255+

});

1256+11601257

it("does not append a delivery instruction when delivery is not requested", async () => {

11611258

mockRunCronFallbackPassthrough();

11621259

resolveCronDeliveryPlanMock.mockReturnValue({ requested: false, mode: "none" });