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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Y
Y Combinator Blog
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
P
Proofpoint News Feed
Jina AI
Jina AI
B
Blog RSS Feed
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
D
Docker

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(codex): preserve native subagent completion results (...
849261680 · 2026-06-08 · via Recent Commits to openclaw:main

@@ -265,6 +265,158 @@ describe("CodexNativeSubagentMonitor", () => {

265265

);

266266

});

267267268+

it("reconciles transcript final text before delivering empty Codex completion notifications", async () => {

269+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-codex-subagent-"));

270+

const codexHome = path.join(tempDir, "codex-home");

271+

const transcriptDir = path.join(codexHome, "sessions", "2026", "06", "07");

272+

await fs.mkdir(transcriptDir, { recursive: true });

273+

await fs.writeFile(

274+

path.join(transcriptDir, "rollout-2026-06-07T08-21-40-child-thread.jsonl"),

275+

[

276+

JSON.stringify({

277+

type: "session_meta",

278+

payload: {

279+

source: {

280+

subagent: {

281+

thread_spawn: {

282+

parent_thread_id: "parent-thread",

283+

depth: 1,

284+

},

285+

},

286+

},

287+

},

288+

}),

289+

JSON.stringify({

290+

timestamp: "2026-06-07T08:22:40.000Z",

291+

type: "event_msg",

292+

payload: {

293+

type: "task_complete",

294+

last_agent_message: "child transcript final result",

295+

completed_at: 1780816960,

296+

},

297+

}),

298+

"",

299+

].join("\n"),

300+

);

301+

const client = createClient();

302+

const runtime = createRuntime();

303+

const monitor = new CodexNativeSubagentMonitor(client, runtime, {

304+

codexHome,

305+

transcriptPollDelaysMs: [60_000],

306+

});

307+

monitor.registerParent({

308+

parentThreadId: "parent-thread",

309+

requesterSessionKey: "agent:main:discord:channel:C123",

310+

taskRuntimeScope: createTaskScope(),

311+

agentId: "main",

312+

});

313+314+

await notifyChildStarted(client);

315+

await client.notify(

316+

nativeCompletionNotification({

317+

agentPath: "child-thread",

318+

statusLabel: "completed",

319+

result: null,

320+

}),

321+

);

322+323+

expect(runtime.finalizeTaskRunByRunId).toHaveBeenCalledWith(

324+

expect.objectContaining({

325+

runId: "codex-thread:child-thread",

326+

status: "succeeded",

327+

terminalSummary: "child transcript final result",

328+

}),

329+

);

330+

expect(runtime.deliverAgentHarnessTaskCompletion).toHaveBeenCalledTimes(1);

331+

expect(runtime.deliverAgentHarnessTaskCompletion).toHaveBeenCalledWith(

332+

expect.objectContaining({

333+

childSessionKey: "codex-thread:child-thread",

334+

childSessionId: "child-thread",

335+

status: "succeeded",

336+

statusLabel: "task_complete",

337+

result: "child transcript final result",

338+

}),

339+

);

340+341+

client.close();

342+

});

343+344+

it("delivers a typed no-final reason when no transcript source is configured", async () => {

345+

const client = createClient();

346+

const runtime = createRuntime();

347+

const monitor = new CodexNativeSubagentMonitor(client, runtime);

348+

monitor.registerParent({

349+

parentThreadId: "parent-thread",

350+

requesterSessionKey: "agent:main:discord:channel:C123",

351+

taskRuntimeScope: createTaskScope(),

352+

agentId: "main",

353+

});

354+355+

await notifyChildStarted(client);

356+

await client.notify(

357+

nativeCompletionNotification({

358+

agentPath: "child-thread",

359+

statusLabel: "completed",

360+

result: null,

361+

}),

362+

);

363+364+

expect(runtime.deliverAgentHarnessTaskCompletion).toHaveBeenCalledWith(

365+

expect.objectContaining({

366+

childSessionId: "child-thread",

367+

status: "succeeded",

368+

statusLabel: "completed_without_final_message",

369+

result: "Codex native subagent completed without a final assistant message.",

370+

}),

371+

);

372+

});

373+374+

it("falls back to typed no-final delivery when transcript reconciliation is unavailable", async () => {

375+

vi.useFakeTimers();

376+

try {

377+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-codex-subagent-"));

378+

const codexHome = path.join(tempDir, "codex-home");

379+

const client = createClient();

380+

const runtime = createRuntime();

381+

const monitor = new CodexNativeSubagentMonitor(client, runtime, {

382+

codexHome,

383+

transcriptPollDelaysMs: [10],

384+

});

385+

monitor.registerParent({

386+

parentThreadId: "parent-thread",

387+

requesterSessionKey: "agent:main:discord:channel:C123",

388+

taskRuntimeScope: createTaskScope(),

389+

agentId: "main",

390+

});

391+392+

await notifyChildStarted(client);

393+

await client.notify(

394+

nativeCompletionNotification({

395+

agentPath: "child-thread",

396+

statusLabel: "completed",

397+

result: null,

398+

}),

399+

);

400+401+

expect(runtime.deliverAgentHarnessTaskCompletion).not.toHaveBeenCalled();

402+403+

await vi.advanceTimersByTimeAsync(20);

404+405+

expect(runtime.deliverAgentHarnessTaskCompletion).toHaveBeenCalledWith(

406+

expect.objectContaining({

407+

childSessionId: "child-thread",

408+

status: "succeeded",

409+

statusLabel: "completed_without_final_message",

410+

result: "Codex native subagent completed without a final assistant message.",

411+

}),

412+

);

413+414+

client.close();

415+

} finally {

416+

vi.useRealTimers();

417+

}

418+

});

419+268420

it("delivers failed parent wakeups from Codex errored subagent notifications", async () => {

269421

const client = createClient();

270422

const runtime = createRuntime();