test: harden matrix subagent spawn prompt · openclaw/openclaw@a00e494
steipete
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -304,10 +304,10 @@ export async function runSubagentThreadSpawnScenario(context: MatrixQaScenarioCo
|
304 | 304 | const { client, startSince } = await primeMatrixQaDriverScenarioClient(context); |
305 | 305 | const childToken = buildMatrixQaToken("MATRIX_QA_SUBAGENT_CHILD"); |
306 | 306 | const triggerBody = [ |
307 | | -`${context.sutUserId} Call sessions_spawn now for this QA check.`, |
308 | | -`Use task="Finish with exactly ${childToken}."`, |
309 | | -"Use label=matrix-thread-subagent thread=true mode=session runTimeoutSeconds=120.", |
310 | | -"Do not send the child token from this parent session.", |
| 307 | +`${context.sutUserId} For this QA check, call the sessions_spawn tool now.`, |
| 308 | +`Use exactly these arguments: task="Finish with exactly ${childToken}.", label="matrix-thread-subagent", thread=true, mode="session", runTimeoutSeconds=120.`, |
| 309 | +"Do not omit thread=true; the child must bind to this Matrix thread.", |
| 310 | +"Do not write the child token in the parent response.", |
311 | 311 | ].join(" "); |
312 | 312 | const driverEventId = await client.sendTextMessage({ |
313 | 313 | body: triggerBody, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2766,7 +2766,7 @@ describe("matrix live qa scenarios", () => {
|
2766 | 2766 | expect(artifacts.threadRootEventId).toBe("$subagent-thread-root"); |
2767 | 2767 | |
2768 | 2768 | expectSentTextMessage(sendTextMessage, { |
2769 | | -bodyIncludes: ["Call sessions_spawn now for this QA check", "runTimeoutSeconds=120"], |
| 2769 | +bodyIncludes: ["call the sessions_spawn tool now", "thread=true", "runTimeoutSeconds=120"], |
2770 | 2770 | mentionUserIds: ["@sut:matrix-qa.test"], |
2771 | 2771 | roomId: "!main:matrix-qa.test", |
2772 | 2772 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。