test(coding-agent): assert the composed spawn brief on the wire
4805 unmodified linesExpand all4806480748084809481048104811481248134814254 unmodified linesExpand all4805 unmodified linesExpand all`);
expect(scheduled.status).toBe("ok"); expect(scheduled.stdout.trim()).toBe("scheduled"); await waitFor(() => prompts.includes("detached child after idle")); await waitFor(() => prompts.some((prompt) => prompt.includes("TASK:\ndetached child after idle")));
const finished = await manager.execute(`_result = await _taskprint(_result.name)254 unmodified linesExpand all140 unmodified linesExpand all141142143144145145146147148149127 unmodified linesExpand all140 unmodified linesExpand all const requestTypes: string[] = []; const hostHandlers: HostRequestHandlers = { "rlm.run": async (payload) => { requestTypes.push("rlm.run"); expect(payload.prompt).toBe("child work"); expect(payload.prompt).toMatch(/^You are child subagent 'worker' at depth \d+\.[\s\S]*\nTASK:\nchild work/); expect(payload.kwargs).toEqual({ name: "worker", model: "anthropic/claude-opus-4-7" }); return { rlm_child_id: "sub-a1b2c3d4", name: "worker",127 unmodified linesExpand all