






















@@ -49,34 +49,33 @@ describe("CodexNativeSubagentTaskMirror", () => {
4949},
5050});
515152-expect(runtime.createRunningTaskRun).toHaveBeenCalledWith(
53-expect.objectContaining({
54- runtime: "subagent",
55- taskKind: "codex-native",
56- sourceId: "codex-thread:child-thread",
57- requesterSessionKey: "agent:main:main",
58- ownerKey: "agent:main:main",
59- scopeKind: "session",
60- agentId: "main",
61- runId: "codex-thread:child-thread",
62- label: "Poincare",
63- task: "write the Madrid wine script",
64- notifyPolicy: "silent",
65- deliveryStatus: "not_applicable",
66- startedAt: 10_000,
67- progressSummary: "Codex native subagent started.",
68-}),
69-);
52+expect(runtime.createRunningTaskRun).toHaveBeenCalledWith({
53+runtime: "subagent",
54+taskKind: "codex-native",
55+sourceId: "codex-thread:child-thread",
56+requesterSessionKey: "agent:main:main",
57+ownerKey: "agent:main:main",
58+scopeKind: "session",
59+agentId: "main",
60+runId: "codex-thread:child-thread",
61+label: "Poincare",
62+task: "write the Madrid wine script",
63+notifyPolicy: "silent",
64+deliveryStatus: "not_applicable",
65+preferMetadata: true,
66+startedAt: 10_000,
67+lastEventAt: 20_000,
68+progressSummary: "Codex native subagent started.",
69+});
7070expect(vi.mocked(runtime.createRunningTaskRun).mock.calls.at(0)?.[0]).not.toHaveProperty(
7171"childSessionKey",
7272);
73-expect(runtime.recordTaskRunProgressByRunId).toHaveBeenCalledWith(
74-expect.objectContaining({
75-runId: "codex-thread:child-thread",
76-runtime: "subagent",
77-progressSummary: "Codex native subagent is active.",
78-}),
79-);
73+expect(runtime.recordTaskRunProgressByRunId).toHaveBeenCalledWith({
74+runId: "codex-thread:child-thread",
75+runtime: "subagent",
76+lastEventAt: 20_000,
77+progressSummary: "Codex native subagent is active.",
78+});
8079});
81808281it("ignores subagent threads spawned by a different parent thread", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。