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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog

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(agents): inherit subagent thinking defaults · opencla...
stevenepalme · 2026-05-31 · via Recent Commits to openclaw:main

@@ -2,25 +2,36 @@ import { describe, expect, it } from "vitest";

22

import type { OpenClawConfig } from "../config/config.js";

33

import { resolveSubagentThinkingOverride } from "./subagent-spawn-thinking.js";

445-

type ThinkingLevel = "high" | "medium" | "low";

5+

type ThinkingLevel = "high" | "medium" | "low" | "off";

6677

function expectResolvedThinkingPlan(input: {

88

expected: ThinkingLevel;

9+

expectedOverride?: ThinkingLevel | null;

910

thinkingOverrideRaw?: string;

11+

callerThinkingRaw?: string;

12+

requesterAgentConfig?: unknown;

13+

targetAgentConfig?: unknown;

14+

cfg?: OpenClawConfig;

1015

}) {

11-

const cfg = {

12-

session: { mainKey: "main", scope: "per-sender" },

13-

agents: { defaults: { subagents: { thinking: "high" } } },

14-

} as OpenClawConfig;

16+

const cfg =

17+

input.cfg ??

18+

({

19+

session: { mainKey: "main", scope: "per-sender" },

20+

agents: { defaults: { subagents: { thinking: "high" } } },

21+

} as OpenClawConfig);

15221623

const plan = resolveSubagentThinkingOverride({

1724

cfg,

25+

requesterAgentConfig: input.requesterAgentConfig,

26+

targetAgentConfig: input.targetAgentConfig,

1827

thinkingOverrideRaw: input.thinkingOverrideRaw,

28+

callerThinkingRaw: input.callerThinkingRaw,

1929

});

20302131

expect(plan).toEqual({

2232

status: "ok",

23-

thinkingOverride: input.expected,

33+

thinkingOverride:

34+

input.expectedOverride === null ? undefined : (input.expectedOverride ?? input.expected),

2435

initialSessionPatch: { thinkingLevel: input.expected },

2536

});

2637

}

@@ -38,4 +49,66 @@ describe("sessions_spawn thinking defaults", () => {

3849

expected: "low",

3950

});

4051

});

52+53+

it("prefers per-agent subagent thinking over global subagent thinking", () => {

54+

expectResolvedThinkingPlan({

55+

targetAgentConfig: { subagents: { thinking: "medium" } },

56+

expected: "medium",

57+

});

58+

});

59+60+

it("prefers requester-agent subagent thinking over target-agent subagent thinking", () => {

61+

expectResolvedThinkingPlan({

62+

requesterAgentConfig: { subagents: { thinking: "low" } },

63+

targetAgentConfig: { subagents: { thinking: "medium" } },

64+

callerThinkingRaw: "high",

65+

expected: "low",

66+

});

67+

});

68+69+

it("inherits caller thinking when no explicit or configured subagent thinking exists", () => {

70+

expectResolvedThinkingPlan({

71+

cfg: {

72+

session: { mainKey: "main", scope: "per-sender" },

73+

agents: { defaults: {} },

74+

} as OpenClawConfig,

75+

callerThinkingRaw: "medium",

76+

expected: "medium",

77+

expectedOverride: null,

78+

});

79+

});

80+81+

it("prefers global subagent thinking over caller thinking", () => {

82+

expectResolvedThinkingPlan({

83+

callerThinkingRaw: "medium",

84+

expected: "high",

85+

});

86+

});

87+88+

it("preserves caller thinking off when inherited", () => {

89+

expectResolvedThinkingPlan({

90+

cfg: {

91+

session: { mainKey: "main", scope: "per-sender" },

92+

agents: { defaults: {} },

93+

} as OpenClawConfig,

94+

callerThinkingRaw: "off",

95+

expected: "off",

96+

expectedOverride: null,

97+

});

98+

});

99+100+

it("preserves explicit thinking off", () => {

101+

expectResolvedThinkingPlan({

102+

thinkingOverrideRaw: "off",

103+

expected: "off",

104+

});

105+

});

106+107+

it("preserves configured subagent thinking off", () => {

108+

expectResolvedThinkingPlan({

109+

targetAgentConfig: { subagents: { thinking: "off" } },

110+

callerThinkingRaw: "high",

111+

expected: "off",

112+

});

113+

});

41114

});