fix: the cron isolated agent in openclaw unconditiona (#383) (#63878)

This commit is contained in:
Devin Robison
2026-04-10 10:44:22 -06:00
committed by GitHub
parent 9c44f10026
commit 54ae138db7
3 changed files with 4 additions and 3 deletions

View File

@@ -119,6 +119,7 @@ Docs: https://docs.openclaw.ai
- Agents/exec: keep sandboxed `tools.exec.host=auto` sessions from honoring per-call `host=node` or `host=gateway` overrides while a sandbox runtime is active, and stop advertising node routing in that state so exec stays on the sandbox host. (#63880)
- Gateway/restart sentinel: route restart notices only from stored canonical delivery metadata and skip outbound guessing from lossy session keys, avoiding misdelivery on case-sensitive channels like Matrix. (#64391) Thanks @gumadeiras.
- Cron/isolated agent: run scheduled agent turns as non-owner senders so owner-only tools stay unavailable during cron execution. (#63878)
## 2026.4.9
### Changes

View File

@@ -131,7 +131,7 @@ export function createCronPromptExecutor(params: {
agentId: params.agentId,
trigger: "cron",
allowGatewaySubagentBinding: true,
senderIsOwner: true,
senderIsOwner: false,
messageChannel: params.messageChannel,
agentAccountId: params.resolvedDelivery.accountId,
sessionFile,

View File

@@ -58,14 +58,14 @@ describe("runCronIsolatedAgentTurn owner auth", () => {
});
it(
"passes senderIsOwner=true to isolated cron agent runs",
"passes senderIsOwner=false to isolated cron agent runs",
{ timeout: RUN_OWNER_AUTH_TIMEOUT_MS },
async () => {
await runCronIsolatedAgentTurn(makeParams());
expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);
const senderIsOwner = runEmbeddedPiAgentMock.mock.calls[0]?.[0]?.senderIsOwner;
expect(senderIsOwner).toBe(true);
expect(senderIsOwner).toBe(false);
},
);
});