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

推荐订阅源

月光博客
月光博客
D
Docker
腾讯CDC
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
IT之家
IT之家
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
爱范儿
爱范儿
Microsoft Azure Blog
Microsoft Azure Blog
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
博客园 - 【当耐特】

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
Make compaction visible and resume final replies · opencl...
simplyclever · 2026-05-03 · via Recent Commits to openclaw:main

@@ -171,6 +171,8 @@ const MAX_SAME_MODEL_IDLE_TIMEOUT_RETRIES = 1;

171171

const EMBEDDED_RUN_LANE_TIMEOUT_GRACE_MS = 30_000;

172172

const MID_TURN_PRECHECK_CONTINUATION_PROMPT =

173173

"Continue from the current transcript after the latest tool result. Do not repeat the original user request, and do not rerun completed tools unless the transcript shows they are still needed.";

174+

const COMPACTION_CONTINUATION_RETRY_INSTRUCTION =

175+

"The previous attempt compacted the conversation context before producing a final user-visible answer. Continue from the compacted transcript and produce the final answer now. Do not restart from scratch, do not repeat completed work, and do not rerun tools unless the transcript clearly lacks required evidence.";

174176

type EmbeddedRunAttemptForRunner = Awaited<ReturnType<typeof runEmbeddedAttemptWithBackend>>;

175177176178

function resolveEmbeddedRunLaneTimeoutMs(timeoutMs: number): number | undefined {

@@ -769,6 +771,7 @@ export async function runEmbeddedPiAgent(

769771

let planningOnlyRetryAttempts = 0;

770772

let reasoningOnlyRetryAttempts = 0;

771773

let emptyResponseRetryAttempts = 0;

774+

let compactionContinuationRetryAttempts = 0;

772775

let sameModelIdleTimeoutRetries = 0;

773776

// Cost-runaway breaker for #76293. State lives at the run-loop level

774777

// on purpose so it survives across attempt boundaries and across

@@ -781,6 +784,7 @@ export async function runEmbeddedPiAgent(

781784

let planningOnlyRetryInstruction: string | null = null;

782785

let reasoningOnlyRetryInstruction: string | null = null;

783786

let emptyResponseRetryInstruction: string | null = null;

787+

let compactionContinuationRetryInstruction: string | null = null;

784788

let nextAttemptPromptOverride: string | null = null;

785789

const ackExecutionFastPathInstruction = resolveAckExecutionFastPathInstruction({

786790

provider,

@@ -996,6 +1000,7 @@ export async function runEmbeddedPiAgent(

9961000

planningOnlyRetryInstruction,

9971001

reasoningOnlyRetryInstruction,

9981002

emptyResponseRetryInstruction,

1003+

compactionContinuationRetryInstruction,

9991004

].filter(

10001005

(value): value is string => typeof value === "string" && value.trim().length > 0,

10011006

);

@@ -2347,6 +2352,29 @@ export async function runEmbeddedPiAgent(

23472352

timedOut,

23482353

attempt,

23492354

});

2355+

if (

2356+

!emptyAssistantReplyIsSilent &&

2357+

attemptCompactionCount > 0 &&

2358+

payloadCount === 0 &&

2359+

!aborted &&

2360+

!promptError &&

2361+

!timedOut &&

2362+

!attempt.clientToolCalls &&

2363+

!attempt.yieldDetected &&

2364+

!attempt.didSendDeterministicApprovalPrompt &&

2365+

!attempt.lastToolError &&

2366+

!hasMessagingToolDeliveryEvidence(attempt) &&

2367+

compactionContinuationRetryAttempts < 1

2368+

) {

2369+

compactionContinuationRetryAttempts += 1;

2370+

compactionContinuationRetryInstruction = COMPACTION_CONTINUATION_RETRY_INSTRUCTION;

2371+

log.warn(

2372+

`compaction interrupted visible final answer: runId=${params.runId} sessionId=${params.sessionId} ` +

2373+

`compactions=${attemptCompactionCount} — retrying ${compactionContinuationRetryAttempts}/1 with compacted-transcript continuation`,

2374+

);

2375+

continue;

2376+

}

2377+

compactionContinuationRetryInstruction = null;

23502378

if (reasoningOnlyRetriesExhausted && !finalAssistantVisibleText) {

23512379

log.warn(

23522380

`reasoning-only retries exhausted: runId=${params.runId} sessionId=${params.sessionId} ` +