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

推荐订阅源

S
Schneier on Security
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
C
Cisco Blogs
AWS News Blog
AWS News Blog
T
Threatpost
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Exploit Database - CXSecurity.com
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
罗磊的独立博客
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
N
News | PayPal Newsroom
Project Zero
Project Zero
NISL@THU
NISL@THU
博客园_首页
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
T
Troy Hunt's Blog
Recorded Future
Recorded Future
N
Netflix TechBlog - Medium
P
Privacy International News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
Arctic Wolf
C
Check Point Blog
W
WeLiveSecurity
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(agents): keep live tool-result prompts cache-stable · openclaw/openclaw@a60947f
vincentkoc · 2026-06-21 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -249,9 +249,10 @@ Shared defaults for bounded runtime context surfaces.

249249

- `toolResultMaxChars`: advanced live tool-result ceiling used for persisted

250250

results and overflow recovery. Leave unset for the model-context auto cap:

251251

`16000` chars below 100K tokens, `32000` chars at 100K+ tokens, and `64000`

252-

chars at 200K+ tokens. The effective cap is still limited to about 30% of the

253-

model context window. `openclaw doctor --deep` prints the effective cap, and

254-

doctor warns only when an explicit override is stale or has no effect.

252+

chars at 200K+ tokens. Explicit values up to `1000000` are accepted for

253+

long-context models, but the effective cap is still limited to about 30% of

254+

the model context window. `openclaw doctor --deep` prints the effective cap,

255+

and doctor warns only when an explicit override is stale or has no effect.

255256

- `postCompactionMaxChars`: AGENTS.md excerpt cap used during post-compaction

256257

refresh injection.

257258
Original file line numberDiff line numberDiff line change

@@ -54,7 +54,7 @@ for bounded runtime excerpts and injected runtime-owned blocks. They are

5454

separate from bootstrap limits, startup-context limits, and skills prompt

5555

limits.

5656
57-

`toolResultMaxChars` is an advanced ceiling. When it is unset, OpenClaw chooses

57+

`toolResultMaxChars` is an advanced ceiling (up to `1000000` characters). When it is unset, OpenClaw chooses

5858

the live tool-result cap from the effective model context window: `16000` chars

5959

below 100K tokens, `32000` chars at 100K+ tokens, and `64000` chars at 200K+

6060

tokens, still bounded by the runtime context-share guard.

Original file line numberDiff line numberDiff line change

@@ -2840,7 +2840,7 @@ describe("runEmbeddedAttempt tool-result guard budget wiring", () => {

28402840

).toBe(1_000_000);

28412841

});

28422842
2843-

it("bounds aggregate tool-result prompt history without rewriting append results", async () => {

2843+

it("preserves the cacheable prefix while bounding current prompt results", async () => {

28442844

const toolText = "process output ".repeat(70);

28452845

const sessionMessages: AgentMessage[] = [{ role: "user", content: "seed", timestamp: 1 }];

28462846

for (let index = 0; index < 8; index += 1) {

@@ -2880,7 +2880,7 @@ describe("runEmbeddedAttempt tool-result guard budget wiring", () => {

28802880

agents: {

28812881

defaults: {

28822882

contextLimits: {

2883-

toolResultMaxChars: 1_000,

2883+

toolResultMaxChars: 2_000,

28842884

},

28852885

},

28862886

list: [{ id: "main" }],

@@ -2902,6 +2902,18 @@ describe("runEmbeddedAttempt tool-result guard budget wiring", () => {

29022902

};

29032903

};

29042904

session.prompt = async (_prompt, options) => {

2905+

for (let index = 0; index < 8; index += 1) {

2906+

session.messages.push({

2907+

role: "toolResult",

2908+

toolCallId: `current_call_${index}`,

2909+

toolName: "process",

2910+

content: [

2911+

{ type: "text", text: `current ${index}: ${"current output ".repeat(300)}` },

2912+

],

2913+

isError: false,

2914+

timestamp: 100 + index,

2915+

} as AgentMessage);

2916+

}

29052917

promptHandlerMessages = session.messages.map((message) => message as AgentMessage);

29062918

options?.preflightResult?.(true);

29072919

await session.agent.streamFn?.({} as never, { messages: session.messages } as never, {});

@@ -2913,8 +2925,14 @@ describe("runEmbeddedAttempt tool-result guard budget wiring", () => {

29132925
29142926

expect(sumToolResultTextChars(sessionMessages)).toBeGreaterThan(4_000);

29152927

expect(sumToolResultTextChars(promptHandlerMessages)).toBeGreaterThan(4_000);

2916-

expect(sumToolResultTextChars(submittedMessages)).toBeLessThanOrEqual(4_000);

2917-

expect(JSON.stringify(submittedMessages)).toContain("truncated");

2928+

const submittedCurrentPromptMessages = submittedMessages.slice(sessionMessages.length);

2929+

expect(submittedMessages.slice(0, sessionMessages.length)).toEqual(sessionMessages);

2930+

expect(

2931+

submittedCurrentPromptMessages

2932+

.filter((message) => message.role === "toolResult")

2933+

.every((message) => sumToolResultTextChars([message]) <= 2_000),

2934+

).toBe(true);

2935+

expect(JSON.stringify(submittedCurrentPromptMessages)).toContain("truncated");

29182936

expect(afterTurn).toHaveBeenCalledTimes(1);

29192937

expect(sumToolResultTextChars(afterTurnMessages)).toBeGreaterThan(4_000);

29202938

expect(JSON.stringify(afterTurnMessages)).not.toContain("truncated");

Original file line numberDiff line numberDiff line change

@@ -542,8 +542,6 @@ export {

542542

};

543543
544544

const MAX_BTW_SNAPSHOT_MESSAGES = 100;

545-

const PROMPT_TOOL_RESULT_AGGREGATE_CAP_MULTIPLIER = 4;

546-
547545

function pluginMetadataSnapshotCoversProvider(

548546

snapshot: PluginMetadataSnapshot | undefined,

549547

provider: string,

@@ -4176,17 +4174,14 @@ export async function runEmbeddedAttempt(

41764174

activeSession.messages,

41774175

contextTokenBudget,

41784176

promptToolResultMaxChars,

4179-

promptToolResultMaxChars * PROMPT_TOOL_RESULT_AGGREGATE_CAP_MULTIPLIER,

4177+

null,

41804178

);

41814179

if (promptToolResultTruncation.truncatedCount > 0) {

41824180

promptHistoryMessages = promptToolResultTruncation.messages;

41834181

log.info(

41844182

`[tool-result-truncation] Truncated ${promptToolResultTruncation.truncatedCount} ` +

41854183

`tool result(s) for prompt history ` +

4186-

`(maxChars=${promptToolResultMaxChars} ` +

4187-

`aggregateBudgetChars=${

4188-

promptToolResultMaxChars * PROMPT_TOOL_RESULT_AGGREGATE_CAP_MULTIPLIER

4189-

}) ` +

4184+

`(maxChars=${promptToolResultMaxChars}) ` +

41904185

`sessionKey=${params.sessionKey ?? params.sessionId ?? "unknown"}`,

41914186

);

41924187

}

@@ -4717,7 +4712,7 @@ export async function runEmbeddedAttempt(

47174712

messages,

47184713

contextTokenBudget,

47194714

promptToolResultMaxChars,

4720-

promptToolResultMaxChars * PROMPT_TOOL_RESULT_AGGREGATE_CAP_MULTIPLIER,

4715+

null,

47214716

);

47224717

return providerPromptHistoryTruncation.truncatedCount > 0

47234718

? providerPromptHistoryTruncation.messages

Original file line numberDiff line numberDiff line change

@@ -437,6 +437,34 @@ describe("truncateOversizedToolResultsInMessages", () => {

437437

medium.length * 3,

438438

);

439439

});

440+
441+

it("keeps prompt projections byte-stable as history grows", () => {

442+

const prefix = [

443+

makeToolResult("p".repeat(15_000), "prefix_1"),

444+

makeToolResult("q".repeat(15_000), "prefix_2"),

445+

];

446+

const suffix = [

447+

makeToolResult("x".repeat(15_000), "current_1"),

448+

makeToolResult("y".repeat(15_000), "current_2"),

449+

];

450+

const messages = [...prefix, ...suffix];

451+
452+

const first = truncateOversizedToolResultsInMessages(messages, 128_000, 12_000, null);

453+

const second = truncateOversizedToolResultsInMessages(

454+

[...messages, makeToolResult("z".repeat(15_000), "current_3")],

455+

128_000,

456+

12_000,

457+

null,

458+

);

459+
460+

expect(first.truncatedCount).toBe(4);

461+

expect(second.truncatedCount).toBe(5);

462+

expect(second.messages.slice(0, messages.length)).toEqual(first.messages);

463+

expect(second.messages.every((message) => getToolResultTextLength(message) <= 12_000)).toBe(

464+

true,

465+

);

466+

expect(messages).toEqual([...prefix, ...suffix]);

467+

});

440468

});

441469
442470

describe("truncateOversizedToolResultsInSession", () => {

Original file line numberDiff line numberDiff line change

@@ -338,17 +338,22 @@ export function truncateOversizedToolResultsInMessages(

338338

messages: AgentMessage[],

339339

contextWindowTokens: number,

340340

maxCharsOverride?: number,

341-

aggregateMaxCharsOverride?: number,

341+

aggregateMaxCharsOverride?: number | null,

342342

): { messages: AgentMessage[]; truncatedCount: number } {

343343

const maxChars = Math.max(

344344

1,

345345

maxCharsOverride ?? calculateMaxToolResultChars(contextWindowTokens),

346346

);

347-

const aggregateBudgetChars = calculateRecoveryAggregateToolResultChars(

348-

contextWindowTokens,

349-

maxChars,

350-

aggregateMaxCharsOverride,

351-

);

347+

// Live prompt assembly disables aggregate rewriting so unchanged history stays byte-stable

348+

// for provider prefix caches; recovery and persisted-session callers keep the aggregate guard.

349+

const aggregateBudgetChars =

350+

aggregateMaxCharsOverride === null

351+

? Number.POSITIVE_INFINITY

352+

: calculateRecoveryAggregateToolResultChars(

353+

contextWindowTokens,

354+

maxChars,

355+

aggregateMaxCharsOverride,

356+

);

352357

const branch = messages.map((message, index) => ({

353358

id: `message-${index}`,

354359

type: "message",

Original file line numberDiff line numberDiff line change

@@ -147,6 +147,20 @@ describe("config schema regressions", () => {

147147

expect(res.ok).toBe(false);

148148

});

149149
150+

it("accepts 1M-character tool result caps for long-context agents", () => {

151+

const res = validateConfigObject({

152+

agents: {

153+

defaults: {

154+

contextLimits: {

155+

toolResultMaxChars: 1_000_000,

156+

},

157+

},

158+

},

159+

});

160+
161+

expect(res.ok).toBe(true);

162+

});

163+
150164

it("accepts agents.defaults and agents.list contextLimits overrides", () => {

151165

const res = validateConfigObject({

152166

agents: {

Original file line numberDiff line numberDiff line change

@@ -297,7 +297,7 @@ export const AgentContextLimitsSchema = z

297297

.object({

298298

memoryGetMaxChars: z.number().int().min(1).max(250_000).optional(),

299299

memoryGetDefaultLines: z.number().int().min(1).max(5_000).optional(),

300-

toolResultMaxChars: z.number().int().min(1).max(250_000).optional(),

300+

toolResultMaxChars: z.number().int().min(1).max(1_000_000).optional(),

301301

postCompactionMaxChars: z.number().int().min(1).max(50_000).optional(),

302302

})

303303

.strict()