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

推荐订阅源

G
Google Developers Blog
博客园 - 聂微东
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
D
Docker
B
Blog
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
月光博客
月光博客
F
Fortinet All Blogs
爱范儿
爱范儿
H
Help Net Security
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
The Cloudflare Blog
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
U
Unit 42

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): require claude fallback source provider · op...
obviyus · 2026-04-28 · via Recent Commits to openclaw:main

@@ -334,14 +334,6 @@ export function readClaudeCliSessionMessages(params: {

334334

return coalesceClaudeCliToolMessages(messages);

335335

}

336336337-

// Compaction surface in Claude Code's JSONL: `/compact` writes a

338-

// `type: "summary"` entry whose `summary` field holds the condensed text,

339-

// and an associated `type: "system", subtype: "compact_boundary"` entry

340-

// whose `compactMetadata` carries `trigger`/`preTokens`. After a boundary,

341-

// only post-compaction `user`/`assistant` turns are written as individual

342-

// entries; pre-compaction context lives in the summary. This shape mirrors

343-

// what Claude Code itself sends to the model after compaction (summary plus

344-

// recent turns), per the upstream session-management docs.

345337

type ClaudeCliCompactBoundaryEntry = {

346338

type: "system";

347339

subtype?: unknown;

@@ -361,20 +353,7 @@ type ClaudeCliSummaryEntry = {

361353

};

362354363355

export type ClaudeCliFallbackSeed = {

364-

/**

365-

* The most recent compaction summary, if the session has been `/compact`-ed

366-

* at any point. Sourced from the latest `type: "summary"` entry, falling

367-

* back to the latest `compact_boundary` content when no explicit summary

368-

* is present (older Claude Code builds).

369-

*/

370356

summaryText?: string;

371-

/**

372-

* User/assistant turns after the most recent compact boundary, or all

373-

* turns when the session has never been compacted. Tool-result turns are

374-

* coalesced into adjacent assistant turns the same way

375-

* `readClaudeCliSessionMessages` does, so consumers can format them like

376-

* a regular transcript.

377-

*/

378357

recentTurns: TranscriptLikeMessage[];

379358

};

380359

@@ -387,11 +366,6 @@ function isCompactBoundary(entry: ClaudeCliProjectEntry): boolean {

387366

}

388367389368

function extractCompactBoundaryFallbackText(entry: ClaudeCliProjectEntry): string | undefined {

390-

// When `/compact` is invoked, Claude Code writes a separate summary entry

391-

// — but on older builds the boundary's `content` ("Conversation compacted")

392-

// is the only signal that compaction happened. Prefer the explicit summary

393-

// when both exist; this fallback gives a non-empty hint when only the

394-

// boundary is present so the seed at least labels the gap honestly.

395369

const content = (entry as ClaudeCliCompactBoundaryEntry).content;

396370

return typeof content === "string" && content.trim() ? content.trim() : undefined;

397371

}

@@ -420,17 +394,6 @@ export function readClaudeCliFallbackSeed(params: {

420394

return undefined;

421395

}

422396423-

// Pair each compact_boundary with the summary entry that preceded it

424-

// since the previous boundary, so a later compaction whose summary is

425-

// missing (e.g. crash mid-write) does not silently keep an older

426-

// compaction's summary alive (#72069 Codex P2). Walk shape:

427-

// - explicit `summary` entry queues into `pendingSummary` until the

428-

// next boundary "consumes" it.

429-

// - `compact_boundary` flushes the pending summary into `lastSummary`,

430-

// refreshes `lastBoundaryFallback` from the boundary's content, and

431-

// drops the windowed turns and tool registry.

432-

// - everything after the latest boundary forms the recent-window the

433-

// fallback runner will replay alongside the summary.

434397

let pendingSummary: string | undefined;

435398

let lastSummary: string | undefined;

436399

let lastBoundaryFallback: string | undefined;

@@ -450,23 +413,15 @@ export function readClaudeCliFallbackSeed(params: {

450413451414

const explicitSummary = extractSummaryText(parsed);

452415

if (explicitSummary) {

453-

// Queue the summary; the next boundary will pair it with itself.

454-

// Multiple summaries between boundaries (rare) take the last one,

455-

// matching how Claude Code's resume picks the most recent summary.

456416

pendingSummary = explicitSummary;

457417

continue;

458418

}

459419460420

if (isCompactBoundary(parsed)) {

461-

lastSummary = pendingSummary; // may be undefined if no preceding summary

421+

lastSummary = pendingSummary;

462422

pendingSummary = undefined;

463423

lastBoundaryFallback = extractCompactBoundaryFallbackText(parsed) ?? lastBoundaryFallback;

464-

// Drop turns that lived before this boundary — they are now

465-

// represented by the summary, and replaying them would double-count

466-

// their tokens against the fallback model's budget.

467424

windowedTurns = [];

468-

// Reset tool-name registry too: tool ids before a compact boundary

469-

// are no longer visible to the post-boundary turns.

470425

toolNameRegistry.clear();

471426

continue;

472427

}

@@ -478,9 +433,6 @@ export function readClaudeCliFallbackSeed(params: {

478433

}

479434480435

const recentTurns = coalesceClaudeCliToolMessages(windowedTurns);

481-

// Honor a `/compact` summary that was written but never followed by a

482-

// boundary marker (older Claude Code build, or graceful-degrade case).

483-

// `pendingSummary` then carries the latest such summary into the result.

484436

const resolvedSummaryText = lastSummary ?? pendingSummary ?? lastBoundaryFallback;

485437

if (!resolvedSummaryText && recentTurns.length === 0) {

486438

return undefined;