Skip to content

fix(anthropic): new Claude models lose reasoning and hit 400s until an OpenClaw release - #196459

Merged
obviyus merged 5 commits into
mainfrom
openclaw/mellow-barnacle
Nov 10, 2026
Merged

obviyus merged 5 commits into
mainfrom
openclaw/mellow-barnacle

Conversation

@obviyus

@obviyus obviyus commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: Claude Fable 5.2 sessions hit a 400 (Invalid signature in thinking block) on every tool loop, then lose their earlier reasoning, when the session runs through a proxy or custom Anthropic base URL. Any Claude model released after an OpenClaw version had the same problem until a release added its name.

User Impact

User impact: a newly released Claude model works correctly with no OpenClaw update. Fable 5.2 keeps its reasoning across tool loops and model switches on every route, with no rejected requests.

  • A Claude id OpenClaw has never seen now gets the strictest known contract: append-only runtime context, adaptive thinking that cannot be turned off, no temperature/top_p/top_k, no assistant prefill, and streamed-refusal handling. Older generations are a closed list that only ever shrinks. Live /v1/models capabilities still override the fallback where Anthropic lists them.
  • Answers for every released model before Fable 5.2 are unchanged, except that Mythos 5.1 is now prefix-bound. Anthropic documents it as rejecting prefix edits on every account.
  • The hand-maintained table of which Claude model can read which model's thinking is gone. One rule replaces it: thinking from a prefix-bound model does not follow a model switch, because the system prompt and tools change with the model. Thinking from older, unbound models is kept, and the API drops whatever the new model cannot read.
  • claude-cli aliases such as fable, opus, and sonnet now resolve through Claude Code's own model menu. OpenClaw no longer keeps a copy of that alias table.

Why This Change Was Made

Each fact now comes from the place that owns it: /v1/models capabilities, Claude Code's initialize menu, or a closed list of released generations. A model name list no longer has to grow with every release. The table of every model-name branch, its origin, and its fact source is under Evidence.

Evidence

Wire captures from a recording proxy in front of api.anthropic.com. Each run was one real OpenClaw agent --local session with tool loops, using the model sequence Fable 5.2 ×2, Opus 5.5, Fable 5.2, Fable 5.1, Fable 5.2. The direct route keeps OpenClaw's real api.anthropic.com path, so drop_block is sent. The custom route uses a configured base URL, as proxies do. "Strict" means the proxy forces prefix_mismatch_behavior: "error", so any edit to earlier turns becomes a 400.

Run HTTP 400 prefix_binding_mismatch model_binding_mismatch Thinking blocks retained
before, custom route 7 / 18 – – never (every 400 is retried without thinking)
before, direct, strict 1 / 15 – – lost after the Fable 5.1 switch
before, direct, current 0 / 13 2 2 dropped server-side
after, custom route 0 / 12 0 0 accumulates to 4
after, custom, strict 0 / 11 0 0 yes
after, direct, current 0 / 14 0 0 yes
after, direct, strict 0 / 14 0 0 yes
  • In every after run, input_transformations is [] on every request.
  • cache_read_input_tokens grows within each model stretch, for example 16,221 → 19,013 → 19,141 → 19,328 on Fable 5.2. It restarts only on a model switch, because the prompt cache is per model.
  • claude-cli sessions, routed through the same proxy before and after, strict mode: 0 × 400, input_transformations: [], growing cache reads. Claude Code owns that history, so OpenClaw was not the cause there.
  • Claude Code 2.1.314's logged-in menu lists claude-fable-5-2 by id and still maps fable → claude-fable-5-1. OpenClaw now follows whatever the menu says.

Tests:

  • New CI coverage: the made-up id claude-zzz-9-9, including the Bedrock and canonical-deployment forms, gets the strict contract. Released generations keep their answers.
  • Updated replay matrix.
  • Menu alias discovery uses the captured menu shape.
  • Alias lookup.
  • Focused suites pass: llm-core contracts, packages/ai, transport transform, replay helpers, and the anthropic, bedrock, vertex, foundry, and copilot extensions.
  • Pre-existing failures, which also fail on unmodified main:
    • provider-runtime.contract.test.ts doctor hint
    • 16 src/agents/cli-runner history/auth tests
  • check:changed: typecheck, lint, boundary, and import-cycle lanes pass. The formatting failure is fixed on this branch. Two lanes still fail, and the cause is outside this diff:
    • Dead export scan: the reported exports are all in files this PR does not touch.
    • Plugin SDK surface budget: 3877 public exports against a limit of 3865, plus 1 wildcard re-export. The base commit 625945b7ae01 reports identical numbers, so this PR changes none of them.
Inventory of Claude model-name branches
Behavior Fact source now This PR
Append-only runtime context (bindsClaudeThinkingPrefix) closed list of unbound generations strict default
Which model reads which thinking the API (model_binding_mismatch) table deleted
Mandatory adaptive thinking /v1/models thinking.types, fallback closed list strict default
Adaptive support /v1/models thinking.types.adaptive, fallback closed list strict default
Sampling parameters closed list strict default
Streamed refusal / adaptive by default closed list (pre-Claude 5) strict default
Assistant prefill closed list strict default
claude-cli aliases Claude Code menu value → resolvedModel table deleted
Effort xhigh/max /v1/models effort (already) unchanged
1M context, server compaction, fast mode, in-history system messages capability claims; unknown stays off unchanged (follow-up: read max_input_tokens and context_management)
API aliases (fable → 5.1) Claude Code menu still says 5.1 unchanged

obviyus and others added 3 commits November 10, 2026 10:52
…n OpenClaw release

Unknown Claude ids now get the strictest known contract (append-only runtime
context, mandatory adaptive thinking, default sampling, no prefill, Claude 5
refusal handling); older generations are closed lists that only shrink, and
listed /v1/models capabilities still win. The hand-kept table of which model
reads which thinking is replaced by one rule: prefix-bound thinking does not
follow a model switch, unbound thinking does, and the API drops what the
target cannot read. claude-cli aliases resolve through Claude Code's own
model menu instead of a core copy.

Co-authored-by: obviyus <[email protected]>
…n OpenClaw release

OpenClaw-Publication: a0d8ceef-1330-427a-a145-c457ac53815f
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: anthropic size: XL labels Nov 10, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

The PR gives unknown Claude models stricter request and replay contracts and derives CLI aliases from Claude Code’s model menu.

Example: A claude-fable-5-2 session performs tool loops through a custom Anthropic endpoint.

  • Before: The reported baseline received 7 HTTP 400 responses across 18 requests and retried without earlier thinking.
  • After: The reported patched run completed 12 requests without HTTP 400 responses and accumulated four retained thinking blocks.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Recorded production-path evidence supports the replay repair, but the incomplete CLI alias cutover introduces a context-budget regression.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body records real OpenClaw agent --local sessions against Anthropic through a recording proxy, with direct/custom routes, strict prefix enforcement, tool loops and model switches; patched runs report zero HTTP 400 responses and retained thinking, establishing the central replay repair.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: New Claude models can reject tool-loop requests and lose retained reasoning when OpenClaw applies an older replay contract.
Reason: The maintainer-authored direction addresses observed provider failures through existing owners and removes a growing compatibility matrix.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR addresses a verified replay failure, but removing the shared CLI alias lookup leaves command and cron callers with incorrect context budgets.

Priority: P1
Reviewed head: 963023098e8076b206ed70d998f274937abb2053

Before merge

  • Resolve native aliases for every CLI caller before removing the lookup (P2) - The new nativeModelId is supplied only by runCliFallbackCandidate, but command/agent execution and isolated cron still call runCliAgent without it. For a supported bare fable selection, both context IDs now remain fable instead of becoming claude-fable-5-1. resolveAnthropicFixedContextWindow does not recognize bare fable, and those callers supply neither modelContextWindow nor modelContextTokens, so preparation falls back to 200,000 tokens instead of the previous 1,000,000. That value becomes CLAUDE_CODE_AUTO_COMPACT_WINDOW, causing earlier compaction and reduced usable history. Resolve the menu identity through the shared prepared-catalog path for these callers before deleting the shared lookup, and add a preparation-boundary regression for a bare fable run.

Findings

  • [P2] Resolve native aliases for every CLI caller before removing the lookup — src/agents/cli-runner/prepare.ts:565-566

Tests

  • Missing end-to-end proof: The reported CLI history runs do not exercise menu-derived context budgeting through command or cron entry points, and base-failing execution of the added regressions is not shown.
Agent review details

How this fits together

The Anthropic plugin discovers model capabilities and native aliases; shared model contracts turn those facts and conversation history into provider requests, while CLI preparation selects context and compaction budgets.

flowchart LR
  A[Provider listing and CLI menu] --> B[Prepared model catalog]
  B --> C[Shared Claude contracts]
  D[Conversation history] --> C
  C --> E[Anthropic transport]
  B --> F[CLI preparation]
  F --> G[Claude Code process]
Loading

Technical review

Best possible solution:

Keep the shared Claude contract repair and resolve native aliases through the prepared catalog for every CLI entry point before retiring the old lookup.

Do we have a high-confidence way to reproduce the issue?

Current main’s predicate and replay-policy consumer establish the missing Fable 5.2 retention path, supported by the author’s recorded live failure; this review ran no target code.

Is this the best way to solve the issue?

The existing shared contracts are the appropriate owners, and the smaller replay rule removes duplicate policy, but native-alias resolution must reach all CLI callers.

Full review comments:

  • [P2] Resolve native aliases for every CLI caller before removing the lookup — src/agents/cli-runner/prepare.ts:565-566
    The new nativeModelId is supplied only by runCliFallbackCandidate, but command/agent execution and isolated cron still call runCliAgent without it. For a supported bare fable selection, both context IDs now remain fable instead of becoming claude-fable-5-1. resolveAnthropicFixedContextWindow does not recognize bare fable, and those callers supply neither modelContextWindow nor modelContextTokens, so preparation falls back to 200,000 tokens instead of the previous 1,000,000. That value becomes CLAUDE_CODE_AUTO_COMPACT_WINDOW, causing earlier compaction and reduced usable history. Resolve the menu identity through the shared prepared-catalog path for these callers before deleting the shared lookup, and add a preparation-boundary regression for a bare fable run.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 179529ec9dd8.

Provenance checked

  • Prefix-binding retention changes intended behavior with a stated reason (de7518b: Model-scoped retention avoided repeated carrier costs for older models whose thinking survives prefix edits.)
  • Cross-model thinking replay changes intended behavior with a stated reason (30837ae: Live replay checks established asymmetric compatibility and preservation for specific model pairs.)
  • Listed capability precedence keeps the original intent (b340251: Advertised capabilities must override model-name fallbacks so newly listed models can execute before a release.)
  • CLI context alias lookup changes intended behavior with a stated reason (cd9913f: The shared preparation path retained canonical context identities for native shorthand selectors across CLI callers.)
  • Request-local replay preparation keeps the original intent (bae87b3: Resolve the destination identity once per history transform without introducing persistent cache state.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/agents/cli-runner/prepare.test.ts src/agents/model-catalog-lookup.test.ts --maxWorkers=1
  • pnpm test src/agents/command/attempt-execution.cli.test.ts src/cron/isolated-agent.auth-profile-propagation.test.ts --maxWorkers=1
  • pnpm check:changed
  • git diff --check

What I checked:

  • Current failure remains on main: Current main recognizes Fable 5.1 specifically in the prefix-binding predicate, leaving Fable 5.2 outside append-only replay; the shared replay-policy consumer uses that predicate. (packages/llm-core/src/model-contracts/anthropic.ts:122, 179529ec9dd8)
  • Reported production-path proof: The fully read PR body reports real agent --local sessions through a recording proxy, including direct/custom endpoints, enforced prefix checks, tool loops and model switches; all four patched API scenarios report zero HTTP 400 responses. (963023098e80)
  • Incomplete CLI alias cutover: Only the reply candidate supplies nativeModelId. Command and cron calls still omit it, while preparation no longer expands fable to its canonical model before resolving the context budget. (src/agents/cli-runner/prepare.ts:565, 963023098e80)
  • Observable budget consequence: The fixed context resolver recognizes canonical claude-fable-5 IDs, not bare fable; without a supplied model limit, CLI preparation falls back to 200,000 tokens and forwards that budget to Claude Code’s native compactor. (src/agents/context-resolution.ts:146, 963023098e80)
  • Verified merge scope: The verified synthetic merge contains the Anthropic changes but excludes the unrelated UI, updater, diagnostics and allocation additions already present on its main parent; those additions are not merge regressions. (c35522910082)
  • Original retention rationale: fix(agents): scope append-only runtime context to prefix-binding Claude models #136990 deliberately limited append-only carriers to proven prefix-binding models to avoid unnecessary context and cache-read costs; this PR explains its stricter fallback using current live replay evidence. (packages/llm-core/src/model-contracts/anthropic.ts, de7518bd051b)

Likely related people:

  • Ayaan Zaidi: Raw commit 859a58f adds extensions/anthropic/cli-model-discovery.ts:92 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 859a58ff8ece; files: extensions/anthropic/cli-model-discovery.ts)
  • Peter Steinberger: Raw commit bae87b3 adds packages/ai/src/providers/anthropic-model-contract.ts:361 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bae87b3b3489; files: packages/ai/src/providers/anthropic-model-contract.ts)
  • Dallin Romney: Raw commit b1697e2 adds packages/llm-core/src/model-contracts/anthropic.ts:62 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b1697e2ae8f6; files: packages/llm-core/src/model-contracts/anthropic.ts)

PR surface

Source +274, Tests +1350, Docs +2, Other +484. Total +2110 across 41 files. Added test files: 7.

View PR surface stats
Area Files Added Removed Net
Source 13 420 146 +274
Tests 14 1360 10 +1350
Docs 2 26 24 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 12 484 0 +484
Total 41 2290 180 +2110

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P1: The reported current-release failure repeatedly rejects real tool-loop requests and strips earlier reasoning during recovery.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P1: The reported current-release failure repeatedly rejects real tool-loop requests and strips earlier reasoning during recovery.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 10, 2026, 12:44 AM ET / 05:44 UTC.

@obviyus
obviyus marked this pull request as ready for review November 10, 2026 07:37
obviyus and others added 2 commits November 10, 2026 13:44
Rebuilds the branch tree as main plus only this PR's 21 files; an earlier
formatting commit accidentally carried unrelated work from the checkout.
Also covers unknown Claude ids in the SDK contract test and allocates the
added test lines.

Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: cb5ef89a-eb41-4019-9877-cd346fd9012f
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: XL labels Nov 10, 2026
@obviyus
obviyus merged commit 25cb583 into main Nov 10, 2026
128 of 131 checks passed
@obviyus
obviyus deleted the openclaw/mellow-barnacle branch November 10, 2026 09:02
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

Szqub added a commit to Szqub/openclaw that referenced this pull request Nov 10, 2026
Prefix-bound replay now covers Fable 5.2 (openclaw#196459), so the alias can follow
the newest Fable. Explicit fable-5.1 and fable-5 selections are unchanged.

Related: openclaw#196248
RomneyDa added a commit that referenced this pull request Nov 10, 2026
…ntracts

main #194473 reworded the file-tool containment hint per source and #196756 compacted tool-result JSON; main #196459 gave unknown Claude ids mandatory adaptive thinking, so the non-reasoning fallback fixture uses a pre-Claude-5 id.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…n OpenClaw release (openclaw#196459)

* fix(anthropic): new Claude models lose reasoning and hit 400s until an OpenClaw release

Unknown Claude ids now get the strictest known contract (append-only runtime
context, mandatory adaptive thinking, default sampling, no prefill, Claude 5
refusal handling); older generations are closed lists that only shrink, and
listed /v1/models capabilities still win. The hand-kept table of which model
reads which thinking is replaced by one rule: prefix-bound thinking does not
follow a model switch, unbound thinking does, and the API drops what the
target cannot read. claude-cli aliases resolve through Claude Code's own
model menu instead of a core copy.

Co-authored-by: obviyus <[email protected]>

* style: format changed files

Co-authored-by: obviyus <[email protected]>

* fix(anthropic): new Claude models lose reasoning and hit 400s until an OpenClaw release

OpenClaw-Publication: a0d8ceef-1330-427a-a145-c457ac53815f

* Publish openclaw/mellow-barnacle

OpenClaw-Publication: cb5ef89a-eb41-4019-9877-cd346fd9012f

---------

Co-authored-by: obviyus <[email protected]>
roboclaw-bot added a commit that referenced this pull request Nov 11, 2026
Align downstream replay expectations with the explicit #196459 owner contract. Keep Fable 5 negative coverage, provider and API matrices, canonical deployment identity, and Bedrock consecutive-turn merging. Actual two-file regression run improves from three failures to 33 passes.

Co-authored-by: obviyus <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
…7225)

Align downstream replay expectations with the explicit openclaw#196459 owner contract. Keep Fable 5 negative coverage, provider and API matrices, canonical deployment identity, and Bedrock consecutive-turn merging. Actual two-file regression run improves from three failures to 33 passes.

Co-authored-by: obviyus <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 14, 2026
Learn the Claude Code version required by Anthropic and retry OAuth requests
once before stream consumption, rebuilding matching headers and billing
identity. Persist the learned requirement through existing plugin state.
Use the full catalog output cap for Claude 5 requests and honor listed
server-compaction capabilities.

Include the relevant strict unknown-Claude contract prerequisite: mandatory
adaptive thinking, default sampling, no assistant prefill, refusal handling,
and prefix-bound replay. Keep released legacy contracts and listed overrides.

(cherry picked from commit 5426184)
Prerequisite: 25cb583 (#196459)

Release adaptation: Adapt both existing SDK and fetch request loops instead
of importing the later unified lifecycle. Retain the release replay API,
normalization, CLI discovery cache, and plugin-owned keyed-store contract.
Exclude unrelated CLI alias migration. Preserve old parity fixtures and add
wire-boundary coverage for retry, output, prefill and cross-model replay.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit 18ef7c55288d9256cd02f08b83797fbf2d5ff5ec)
RomneyDa added a commit that referenced this pull request Nov 14, 2026
…during compaction (#196550)

* fix: reduce Gateway heap spikes during long-session compaction

OpenClaw-Publication: 3c8ed9c2-cdf2-4a3e-9cfc-cb237d488ace

* fix: reuse compaction facts without repeated transcript parsing

OpenClaw-Publication: b899f5e4-7fb9-46f0-9b19-635e33a8b99c

* Publish openclaw/keen-prawn

OpenClaw-Publication: 33dc62a0-c779-4768-97d2-4b3fa2323cdf

* Publish openclaw/keen-prawn

OpenClaw-Publication: f8c0512a-6354-4487-b291-d85f50f68262

* fix: reconcile compaction regression-test allocation

OpenClaw-Publication: 90ea6a98-3750-4df1-8f07-6333b0ba229c

* fix(compaction): free the compaction worker during summary model calls

* fix: match compaction concurrency test-line credit to its net growth

* perf(compaction): check only captured rows before rerendering summary input

* test: align worker containment and Claude fallback tests with main contracts

main #194473 reworded the file-tool containment hint per source and #196756 compacted tool-result JSON; main #196459 gave unknown Claude ids mandatory adaptive thinking, so the non-reasoning fallback fixture uses a pre-Claude-5 id.

* refactor(compaction): keep preflight metadata in its reader

Co-authored-by: RomneyDa <[email protected]>

* fix(compaction): detach bounded floor facts from transcript payloads

Prevent small excerpts and identifier captures from retaining whole source strings while a compaction plan is cached. Add a GC retention regression for the owning producer.

Co-authored-by: RomneyDa <[email protected]>

* fix(workers): defer slow idle GC logging imports

Keep the slow-GC diagnostic behind its own lazy operation boundary so small workers do not eagerly evaluate the logging graph. Preserve collection thresholds and warning fields.

The existing production build gate reproduces 240 identity-worker modules on the base and passes at 203 after the repair (budget 220 unchanged). Full and sourcePerformance builds, 11 focused worker tests, infra typecheck, lint, and format checks pass. Independent native review found no actionable P0/P1/P2 findings; local autoreview was unavailable because Codex was not installed.

Co-authored-by: RomneyDa <[email protected]>

* fix: complete compaction wrapper inventory

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
…during compaction (openclaw#196550)

* fix: reduce Gateway heap spikes during long-session compaction

OpenClaw-Publication: 3c8ed9c2-cdf2-4a3e-9cfc-cb237d488ace

* fix: reuse compaction facts without repeated transcript parsing

OpenClaw-Publication: b899f5e4-7fb9-46f0-9b19-635e33a8b99c

* Publish openclaw/keen-prawn

OpenClaw-Publication: 33dc62a0-c779-4768-97d2-4b3fa2323cdf

* Publish openclaw/keen-prawn

OpenClaw-Publication: f8c0512a-6354-4487-b291-d85f50f68262

* fix: reconcile compaction regression-test allocation

OpenClaw-Publication: 90ea6a98-3750-4df1-8f07-6333b0ba229c

* fix(compaction): free the compaction worker during summary model calls

* fix: match compaction concurrency test-line credit to its net growth

* perf(compaction): check only captured rows before rerendering summary input

* test: align worker containment and Claude fallback tests with main contracts

main openclaw#194473 reworded the file-tool containment hint per source and openclaw#196756 compacted tool-result JSON; main openclaw#196459 gave unknown Claude ids mandatory adaptive thinking, so the non-reasoning fallback fixture uses a pre-Claude-5 id.

* refactor(compaction): keep preflight metadata in its reader

Co-authored-by: RomneyDa <[email protected]>

* fix(compaction): detach bounded floor facts from transcript payloads

Prevent small excerpts and identifier captures from retaining whole source strings while a compaction plan is cached. Add a GC retention regression for the owning producer.

Co-authored-by: RomneyDa <[email protected]>

* fix(workers): defer slow idle GC logging imports

Keep the slow-GC diagnostic behind its own lazy operation boundary so small workers do not eagerly evaluate the logging graph. Preserve collection thresholds and warning fields.

The existing production build gate reproduces 240 identity-worker modules on the base and passes at 203 after the repair (budget 220 unchanged). Full and sourcePerformance builds, 11 focused worker tests, infra typecheck, lint, and format checks pass. Independent native review found no actionable P0/P1/P2 findings; local autoreview was unavailable because Codex was not installed.

Co-authored-by: RomneyDa <[email protected]>

* fix: complete compaction wrapper inventory

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: anthropic P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant