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

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
V
Vulnerabilities – Threatpost
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
The GitHub Blog
The GitHub Blog
NISL@THU
NISL@THU
AWS News Blog
AWS News Blog
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
Cyberwarzone
Cyberwarzone
V
V2EX
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
Scott Helme
Scott Helme
A
Arctic Wolf
美团技术团队
S
Schneier on Security
P
Proofpoint News Feed
G
Google Developers Blog
The Hacker News
The Hacker News
S
Securelist
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
量子位
T
Threatpost
Spread Privacy
Spread Privacy
Help Net Security
Help Net Security
B
Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
J
Java Code Geeks
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
Cloudbric
Cloudbric

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix: isolate cron context-engine session keys (#72292) · openclaw/openclaw@a3c51f9
jalehman · 2026-04-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -27,6 +27,7 @@ Docs: https://docs.openclaw.ai

2727

- Plugins: share package entrypoint resolution between install and discovery, reject mismatched `runtimeExtensions`, and cache bundled runtime-dependency manifest reads during scans. Thanks @codex.

2828

- WhatsApp/Web: keep quiet but healthy linked-device sessions connected by basing the watchdog on WhatsApp Web transport activity, while retaining a longer app-silence cap so frame activity cannot mask a stuck session forever. Fixes #70678; carries forward the focused #71466 approach and keeps #63939 as related configurable-timeout follow-up. Thanks @vincentkoc and @oromeis.

2929

- Discord/gateway: count failed health-monitor restart attempts toward cooldown and hourly caps, and evict stale account lifecycle state during channel reloads so repeated Discord gateway recovery cannot loop on old status. Fixes #38596. (#40413) Thanks @jellyAI-dev and @vashquez.

30+

- Cron/context engine: run isolated cron jobs under run-scoped context-engine session keys so prior runs of the same job are not inherited unless the job is explicitly session-bound. (#72292) Thanks @jalehman.

3031
3132

## 2026.4.26

3233
Original file line numberDiff line numberDiff line change

@@ -102,7 +102,7 @@ describe("runCronIsolatedAgentTurn session identity", () => {

102102

workspaceDir?: string;

103103

sessionFile?: string;

104104

};

105-

expect(call?.sessionKey).toBe("agent:ops:cron:job-ops");

105+

expect(call?.sessionKey).toMatch(/^agent:ops:cron:job-ops:run:/);

106106

expect(call?.workspaceDir).toBe(opsWorkspace);

107107

expect(call?.sessionFile).toContain(path.join("agents", "ops"));

108108

});

Original file line numberDiff line numberDiff line change

@@ -128,6 +128,7 @@ function makeBaseParams(overrides: {

128128

runStartedAt?: number;

129129

sessionTarget?: string;

130130

deliveryBestEffort?: boolean;

131+

runSessionKey?: string;

131132

}): Parameters<typeof dispatchCronDelivery>[0] {

132133

const resolvedDelivery = makeResolvedDelivery();

133134

const runStartedAt = overrides.runStartedAt ?? Date.now();

@@ -144,6 +145,7 @@ function makeBaseParams(overrides: {

144145

} as never,

145146

agentId: "main",

146147

agentSessionKey: "agent:main",

148+

runSessionKey: overrides.runSessionKey ?? "agent:main",

147149

sessionId: "test-session-id",

148150

runStartedAt,

149151

runEndedAt: runStartedAt,

@@ -271,6 +273,42 @@ describe("dispatchCronDelivery — double-announce guard", () => {

271273

);

272274

});

273275
276+

it("uses the run-scoped session key for isolated cron descendant fallback delivery", async () => {

277+

const runStartedAt = 1_000;

278+

const agentSessionKey = "agent:main:cron:daily-monitor";

279+

const runSessionKey = "agent:main:cron:daily-monitor:run:test-session-id";

280+

vi.mocked(countActiveDescendantRuns).mockReturnValue(0);

281+

vi.mocked(isLikelyInterimCronMessage).mockReturnValue(true);

282+

vi.mocked(readDescendantSubagentFallbackReply).mockImplementation(async (params) =>

283+

params.sessionKey === runSessionKey

284+

? "Run-scoped child result, everything finished successfully."

285+

: undefined,

286+

);

287+
288+

const params = makeBaseParams({

289+

synthesizedText: "on it",

290+

runStartedAt,

291+

runSessionKey,

292+

});

293+

params.agentSessionKey = agentSessionKey;

294+
295+

const state = await dispatchCronDelivery(params);

296+
297+

expect(countActiveDescendantRuns).toHaveBeenCalledWith(runSessionKey);

298+

expect(countActiveDescendantRuns).not.toHaveBeenCalledWith(agentSessionKey);

299+

expect(readDescendantSubagentFallbackReply).toHaveBeenCalledWith({

300+

sessionKey: runSessionKey,

301+

runStartedAt,

302+

});

303+

expect(state.deliveryAttempted).toBe(true);

304+

expect(state.delivered).toBe(true);

305+

expect(deliverOutboundPayloads).toHaveBeenCalledWith(

306+

expect.objectContaining({

307+

payloads: [{ text: "Run-scoped child result, everything finished successfully." }],

308+

}),

309+

);

310+

});

311+
274312

it("normal text delivery sends exactly once and sets deliveryAttempted=true", async () => {

275313

vi.mocked(countActiveDescendantRuns).mockReturnValue(0);

276314

vi.mocked(isLikelyInterimCronMessage).mockReturnValue(false);

Original file line numberDiff line numberDiff line change

@@ -104,6 +104,7 @@ type DispatchCronDeliveryParams = {

104104

job: CronJob;

105105

agentId: string;

106106

agentSessionKey: string;

107+

runSessionKey: string;

107108

sessionId: string;

108109

runStartedAt: number;

109110

runEndedAt: number;

@@ -684,8 +685,9 @@ export async function dispatchCronDelivery(

684685

const initialSynthesizedText = synthesizedText.trim();

685686

const expectedSubagentFollowup = expectsSubagentFollowup(initialSynthesizedText);

686687

const subagentRegistryRuntime = await loadDeliverySubagentRegistryRuntime();

688+

const subagentFollowupSessionKey = params.runSessionKey;

687689

let activeSubagentRuns = subagentRegistryRuntime.countActiveDescendantRuns(

688-

params.agentSessionKey,

690+

subagentFollowupSessionKey,

689691

);

690692

const shouldCheckCompletedDescendants =

691693

activeSubagentRuns === 0 && isLikelyInterimCronMessage(initialSynthesizedText);

@@ -701,24 +703,24 @@ export async function dispatchCronDelivery(

701703

// descendant's output instead of the interim cron text.

702704

const completedDescendantReply = shouldCheckCompletedDescendants

703705

? await subagentFollowupRuntime?.readDescendantSubagentFallbackReply({

704-

sessionKey: params.agentSessionKey,

706+

sessionKey: subagentFollowupSessionKey,

705707

runStartedAt: params.runStartedAt,

706708

})

707709

: undefined;

708710

const hadDescendants = activeSubagentRuns > 0 || Boolean(completedDescendantReply);

709711

if (activeSubagentRuns > 0 || expectedSubagentFollowup) {

710712

let finalReply = await subagentFollowupRuntime?.waitForDescendantSubagentSummary({

711-

sessionKey: params.agentSessionKey,

713+

sessionKey: subagentFollowupSessionKey,

712714

initialReply: initialSynthesizedText,

713715

timeoutMs: params.timeoutMs,

714716

observedActiveDescendants: activeSubagentRuns > 0 || expectedSubagentFollowup,

715717

});

716718

activeSubagentRuns = subagentRegistryRuntime.countActiveDescendantRuns(

717-

params.agentSessionKey,

719+

subagentFollowupSessionKey,

718720

);

719721

if (!finalReply && activeSubagentRuns === 0) {

720722

finalReply = await subagentFollowupRuntime?.readDescendantSubagentFallbackReply({

721-

sessionKey: params.agentSessionKey,

723+

sessionKey: subagentFollowupSessionKey,

722724

runStartedAt: params.runStartedAt,

723725

});

724726

}

Original file line numberDiff line numberDiff line change

@@ -63,6 +63,7 @@ export function createCronPromptExecutor(params: {

6363

agentId: string;

6464

agentDir: string;

6565

agentSessionKey: string;

66+

runSessionKey: string;

6667

workspaceDir: string;

6768

lane?: string;

6869

resolvedVerboseLevel: VerboseLevel;

@@ -127,7 +128,7 @@ export function createCronPromptExecutor(params: {

127128

: await getCliSessionId(params.cronSession.sessionEntry, providerOverride);

128129

const result = await runCliAgent({

129130

sessionId: params.cronSession.sessionEntry.sessionId,

130-

sessionKey: params.agentSessionKey,

131+

sessionKey: params.runSessionKey,

131132

agentId: params.agentId,

132133

trigger: "cron",

133134

jobId: params.job.id,

@@ -162,7 +163,7 @@ export function createCronPromptExecutor(params: {

162163

});

163164

const result = await runEmbeddedPiAgent({

164165

sessionId: params.cronSession.sessionEntry.sessionId,

165-

sessionKey: params.agentSessionKey,

166+

sessionKey: params.runSessionKey,

166167

agentId: params.agentId,

167168

trigger: "cron",

168169

jobId: params.job.id,

@@ -248,6 +249,7 @@ export async function executeCronRun(params: {

248249

agentId: string;

249250

agentDir: string;

250251

agentSessionKey: string;

252+

runSessionKey: string;

251253

workspaceDir: string;

252254

lane?: string;

253255

resolvedDelivery: {

@@ -281,7 +283,7 @@ export async function executeCronRun(params: {

281283

normalizeVerboseLevel(params.agentVerboseDefault) ??

282284

"off";

283285

registerAgentRunContext(params.cronSession.sessionEntry.sessionId, {

284-

sessionKey: params.agentSessionKey,

286+

sessionKey: params.runSessionKey,

285287

verboseLevel: resolvedVerboseLevel,

286288

});

287289

const executor = createCronPromptExecutor({

@@ -291,6 +293,7 @@ export async function executeCronRun(params: {

291293

agentId: params.agentId,

292294

agentDir: params.agentDir,

293295

agentSessionKey: params.agentSessionKey,

296+

runSessionKey: params.runSessionKey,

294297

workspaceDir: params.workspaceDir,

295298

lane: params.lane,

296299

resolvedVerboseLevel,

@@ -378,12 +381,12 @@ export async function executeCronRun(params: {

378381

if (shouldRetryInterimAck) {

379382

const { countActiveDescendantRuns, listDescendantRunsForRequester } =

380383

await loadCronSubagentRegistryRuntime();

381-

hasFreshDescendants = listDescendantRunsForRequester(params.agentSessionKey).some((entry) => {

384+

hasFreshDescendants = listDescendantRunsForRequester(params.runSessionKey).some((entry) => {

382385

const descendantStartedAt =

383386

typeof entry.startedAt === "number" ? entry.startedAt : entry.createdAt;

384387

return typeof descendantStartedAt === "number" && descendantStartedAt >= runStartedAt;

385388

});

386-

hasActiveDescendants = countActiveDescendantRuns(params.agentSessionKey) > 0;

389+

hasActiveDescendants = countActiveDescendantRuns(params.runSessionKey) > 0;

387390

}

388391
389392

if (shouldRetryInterimAck && !hasFreshDescendants && !hasActiveDescendants) {

Original file line numberDiff line numberDiff line change

@@ -23,7 +23,7 @@ function makeCronSession(entry = makeSessionEntry()): MutableCronSession {

2323

}

2424
2525

describe("createPersistCronSessionEntry", () => {

26-

it("persists a distinct run-session snapshot for isolated cron runs", async () => {

26+

it("persists isolated cron state only under the stable cron session key", async () => {

2727

const cronSession = makeCronSession(

2828

makeSessionEntry({

2929

status: "running",

@@ -39,35 +39,24 @@ describe("createPersistCronSessionEntry", () => {

3939

const store: Record<string, SessionEntry> = {};

4040

update(store);

4141

expect(store["agent:main:cron:job"]).toBe(cronSession.sessionEntry);

42-

expect(store["agent:main:cron:job:run:run-session-id"]).not.toBe(cronSession.sessionEntry);

43-

expect(store["agent:main:cron:job:run:run-session-id"]).toEqual(cronSession.sessionEntry);

42+

expect(store["agent:main:cron:job:run:run-session-id"]).toBeUndefined();

4443

},

4544

);

4645
4746

const persist = createPersistCronSessionEntry({

4847

isFastTestEnv: false,

4948

cronSession,

5049

agentSessionKey: "agent:main:cron:job",

51-

runSessionKey: "agent:main:cron:job:run:run-session-id",

5250

updateSessionStore,

5351

});

5452
5553

await persist();

5654
5755

expect(cronSession.store["agent:main:cron:job"]).toBe(cronSession.sessionEntry);

58-

expect(cronSession.store["agent:main:cron:job:run:run-session-id"]).not.toBe(

59-

cronSession.sessionEntry,

60-

);

61-
62-

cronSession.sessionEntry.status = "done";

63-

cronSession.sessionEntry.skillsSnapshot!.skills[0].name = "changed";

64-

expect(cronSession.store["agent:main:cron:job:run:run-session-id"]?.status).toBe("running");

65-

expect(

66-

cronSession.store["agent:main:cron:job:run:run-session-id"]?.skillsSnapshot?.skills[0]?.name,

67-

).toBe("memory");

56+

expect(cronSession.store["agent:main:cron:job:run:run-session-id"]).toBeUndefined();

6857

});

6958
70-

it("uses the shared session entry when the run key is the agent session key", async () => {

59+

it("persists explicit session-bound cron state under the requested session key", async () => {

7160

const cronSession = makeCronSession();

7261

const updateSessionStore = vi.fn(

7362

async (_storePath, update: (store: Record<string, SessionEntry>) => void) => {

@@ -81,7 +70,6 @@ describe("createPersistCronSessionEntry", () => {

8170

isFastTestEnv: false,

8271

cronSession,

8372

agentSessionKey: "agent:main:session",

84-

runSessionKey: "agent:main:session",

8573

updateSessionStore,

8674

});

8775
Original file line numberDiff line numberDiff line change

@@ -19,31 +19,19 @@ type UpdateSessionStore = (

1919
2020

export type PersistCronSessionEntry = () => Promise<void>;

2121
22-

function cloneSessionEntry(entry: MutableCronSessionEntry): MutableCronSessionEntry {

23-

return globalThis.structuredClone(entry);

24-

}

25-
2622

export function createPersistCronSessionEntry(params: {

2723

isFastTestEnv: boolean;

2824

cronSession: MutableCronSession;

2925

agentSessionKey: string;

30-

runSessionKey: string;

3126

updateSessionStore: UpdateSessionStore;

3227

}): PersistCronSessionEntry {

3328

return async () => {

3429

if (params.isFastTestEnv) {

3530

return;

3631

}

37-

const runSessionEntry = cloneSessionEntry(params.cronSession.sessionEntry);

3832

params.cronSession.store[params.agentSessionKey] = params.cronSession.sessionEntry;

39-

if (params.runSessionKey !== params.agentSessionKey) {

40-

params.cronSession.store[params.runSessionKey] = runSessionEntry;

41-

}

4233

await params.updateSessionStore(params.cronSession.storePath, (store) => {

4334

store[params.agentSessionKey] = params.cronSession.sessionEntry;

44-

if (params.runSessionKey !== params.agentSessionKey) {

45-

store[params.runSessionKey] = runSessionEntry;

46-

}

4735

});

4836

};

4937

}

Original file line numberDiff line numberDiff line change

@@ -89,5 +89,11 @@ describe("runCronIsolatedAgentTurn — interim ack retry", () => {

8989
9090

mockRunCronFallbackPassthrough();

9191

await runTurnAndExpectOk(1, 1);

92+

expect(listDescendantRunsForRequesterMock).toHaveBeenCalledWith(

93+

"agent:default:cron:test:run:test-session-id",

94+

);

95+

expect(countActiveDescendantRunsMock).toHaveBeenCalledWith(

96+

"agent:default:cron:test:run:test-session-id",

97+

);

9298

});

9399

});

Original file line numberDiff line numberDiff line change

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

236236

agentId: "default",

237237

agentDir: "/tmp/agent-dir",

238238

agentSessionKey: "cron:message-tool-policy",

239+

runSessionKey: "cron:message-tool-policy:run:test-session-id",

239240

workspaceDir: "/tmp/workspace",

240241

resolvedVerboseLevel: "off",

241242

thinkLevel: undefined,