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

推荐订阅源

腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
I
InfoQ
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
有赞技术团队
有赞技术团队
G
Google Developers Blog
L
LangChain Blog
博客园_首页
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
IT之家
IT之家
量子位
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网

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
feat: add forked subagent context · openclaw/openclaw@f50...
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -99,6 +99,7 @@ type MockOpenAiRequestSnapshot = {

9999

providerVariant: MockOpenAiProviderVariant;

100100

imageInputCount: number;

101101

plannedToolName?: string;

102+

plannedToolArgs?: Record<string, unknown>;

102103

};

103104104105

// Anthropic /v1/messages request/response shapes the mock actually needs.

@@ -577,6 +578,7 @@ function buildExplicitSessionsSpawnArgs(text: string): Record<string, unknown> |

577578

}

578579

const label = extractQuotedToolArg(text, "label") ?? extractBareToolArg(text, "label");

579580

const mode = extractBareToolArg(text, "mode")?.toLowerCase();

581+

const context = extractBareToolArg(text, "context")?.toLowerCase();

580582

const runTimeoutSecondsRaw = extractBareToolArg(text, "runTimeoutSeconds");

581583

const runTimeoutSeconds =

582584

runTimeoutSecondsRaw && /^\d+$/.test(runTimeoutSecondsRaw)

@@ -587,6 +589,7 @@ function buildExplicitSessionsSpawnArgs(text: string): Record<string, unknown> |

587589

...(label ? { label } : {}),

588590

...(extractBareToolArg(text, "thread")?.toLowerCase() === "true" ? { thread: true } : {}),

589591

...(mode === "session" || mode === "run" ? { mode } : {}),

592+

...(context === "fork" || context === "isolated" ? { context } : {}),

590593

...(runTimeoutSeconds !== undefined ? { runTimeoutSeconds } : {}),

591594

};

592595

}

@@ -745,11 +748,27 @@ function buildAssistantText(

745748

if (/fanout worker beta/i.test(prompt)) {

746749

return "BETA-OK";

747750

}

751+

if (/report the visible code/i.test(prompt) && /FORKED-CONTEXT-ALPHA/i.test(allInputText)) {

752+

return "FORKED-CONTEXT-ALPHA";

753+

}

748754

const fanoutCompleteReply = "subagent-1: ok\nsubagent-2: ok";

749755

if (scenarioState.subagentFanoutPhase === 2 && prompt) {

750756

scenarioState.subagentFanoutPhase = 3;

751757

return fanoutCompleteReply;

752758

}

759+

if (

760+

/forked subagent context qa check/i.test(prompt) &&

761+

/FORKED-CONTEXT-ALPHA/i.test(allInputText)

762+

) {

763+

return [

764+

"Worked",

765+

"- FORKED-CONTEXT-ALPHA",

766+

"Evidence",

767+

"- The forked child recovered the visible code from requester transcript context.",

768+

"Blocked",

769+

"- None.",

770+

].join("\n");

771+

}

753772

if (toolOutput && (/\bdelegate\b/i.test(prompt) || /subagent handoff/i.test(prompt))) {

754773

const compact = toolOutput.replace(/\s+/g, " ").trim() || "no delegated output";

755774

return `Delegated task:\n- Inspect the QA workspace via a bounded subagent.\nResult:\n- ${compact}\nEvidence:\n- The child result was folded back into the main thread exactly once.`;

@@ -802,6 +821,25 @@ function extractPlannedToolName(events: StreamEvent[]) {

802821

return undefined;

803822

}

804823824+

function extractPlannedToolArgs(events: StreamEvent[]) {

825+

for (const event of events) {

826+

if (event.type !== "response.output_item.done") {

827+

continue;

828+

}

829+

const item = event.item as { type?: unknown; arguments?: unknown };

830+

if (item.type !== "function_call" || typeof item.arguments !== "string") {

831+

continue;

832+

}

833+

try {

834+

const parsed = JSON.parse(item.arguments);

835+

return parsed && typeof parsed === "object" ? (parsed as Record<string, unknown>) : undefined;

836+

} catch {

837+

return undefined;

838+

}

839+

}

840+

return undefined;

841+

}

842+805843

type MockAssistantMessageSpec = {

806844

id: string;

807845

phase?: "commentary" | "final_answer";

@@ -1277,6 +1315,14 @@ async function buildResponsesPayload(

12771315

if (canCallSessionsSpawn && explicitSessionsSpawnArgs && !toolOutput) {

12781316

return buildToolCallEventsWithArgs("sessions_spawn", explicitSessionsSpawnArgs);

12791317

}

1318+

if (canCallSessionsSpawn && /forked subagent context qa check/i.test(prompt) && !toolOutput) {

1319+

return buildToolCallEventsWithArgs("sessions_spawn", {

1320+

task: "Report the visible code from the requester transcript.",

1321+

label: "qa-fork-context",

1322+

mode: "run",

1323+

context: "fork",

1324+

});

1325+

}

12801326

if (/tool continuity check/i.test(prompt) && !toolOutput) {

12811327

return buildToolCallEventsWithArgs("read", { path: "QA_KICKOFF_TASK.md" });

12821328

}

@@ -1814,6 +1860,7 @@ export async function startQaMockOpenAiServer(params?: { host?: string; port?: n

18141860

providerVariant: resolveProviderVariant(resolvedModel),

18151861

imageInputCount: countImageInputs(input),

18161862

plannedToolName: extractPlannedToolName(events),

1863+

plannedToolArgs: extractPlannedToolArgs(events),

18171864

};

18181865

requests.push(lastRequest);

18191866

if (requests.length > 50) {

@@ -1869,6 +1916,7 @@ export async function startQaMockOpenAiServer(params?: { host?: string; port?: n

18691916

providerVariant: resolveProviderVariant(normalizedModel),

18701917

imageInputCount: countImageInputs(input),

18711918

plannedToolName: extractPlannedToolName(events),

1919+

plannedToolArgs: extractPlannedToolArgs(events),

18721920

};

18731921

requests.push(lastRequest);

18741922

if (requests.length > 50) {