openclaw - 💡(How to fix) Fix LCM compaction sends deprecated parameter to claude-opus-4-7, causing repeated API errors and retry loops [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70582Fetched 2026-04-24 05:56:04
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

After upgrading to OpenClaw 2026.4.21, LCM (Lossless Context Management) compaction is sending temperature: 0.2 to anthropic/claude-opus-4-7, which no longer accepts this parameter. This causes every compaction attempt to fail with a 400 error and then retry, wasting tokens and introducing latency.

Error Message

After upgrading to OpenClaw 2026.4.21, LCM (Lossless Context Management) compaction is sending temperature: 0.2 to anthropic/claude-opus-4-7, which no longer accepts this parameter. This causes every compaction attempt to fail with a 400 error and then retry, wasting tokens and introducing latency.

Error observed in logs

[lcm] empty normalized summary on first attempt; finish=error; error_message=400 {"type":"error","error":{"type":"invalid_request_error","message":"temperature is deprecated for this model."}}

  • The repeated error/retry loop appears to cause downstream issues with tool result handling in the active session ("missing tool result" synthetic errors inserted into transcript)

Root Cause

After upgrading to OpenClaw 2026.4.21, LCM (Lossless Context Management) compaction is sending temperature: 0.2 to anthropic/claude-opus-4-7, which no longer accepts this parameter. This causes every compaction attempt to fail with a 400 error and then retry, wasting tokens and introducing latency.

Fix Action

Workaround

None currently available on the user side — the temperature parameter is hardcoded in the LCM compaction request path.

Code Example

[lcm] empty normalized summary on first attempt; finish=error; 
error_message=400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."}}
[lcm] retry succeeded; source=retry
[lcm] summary resolved via non-content path; source=retry
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

After upgrading to OpenClaw 2026.4.21, LCM (Lossless Context Management) compaction is sending temperature: 0.2 to anthropic/claude-opus-4-7, which no longer accepts this parameter. This causes every compaction attempt to fail with a 400 error and then retry, wasting tokens and introducing latency.

Error observed in logs

[lcm] empty normalized summary on first attempt; finish=error; 
error_message=400 {"type":"error","error":{"type":"invalid_request_error","message":"`temperature` is deprecated for this model."}}
[lcm] retry succeeded; source=retry
[lcm] summary resolved via non-content path; source=retry

This pattern repeats every compaction cycle throughout the day.

Impact

  • Every LCM compaction fails on first attempt and requires a retry (~30-60 seconds of extra latency per compaction)
  • The failed API call still consumes time and likely contributes to billing
  • The repeated error/retry loop appears to cause downstream issues with tool result handling in the active session ("missing tool result" synthetic errors inserted into transcript)

Steps to Reproduce

  1. Use anthropic/claude-opus-4-7 as the primary model
  2. Run a session long enough to trigger LCM compaction
  3. Check gateway logs for [lcm] empty normalized summary errors

Expected Behavior

LCM compaction should detect that claude-opus-4-7 does not accept the temperature parameter and omit it (or use conservative settings directly without a failed first attempt).

Environment

  • OpenClaw version: 2026.4.21 (f788c88)
  • Model: anthropic/claude-opus-4-7
  • Provider: anthropic (api_key mode)

Workaround

None currently available on the user side — the temperature parameter is hardcoded in the LCM compaction request path.

extent analysis

TL;DR

Remove or update the hardcoded temperature parameter in the LCM compaction request path to accommodate the deprecation in anthropic/claude-opus-4-7.

Guidance

  • Verify the anthropic/claude-opus-4-7 model documentation to confirm the deprecation of the temperature parameter and check for any recommended alternatives.
  • Investigate the OpenClaw codebase to locate where the temperature parameter is hardcoded in the LCM compaction request path.
  • Consider implementing a model-specific configuration or override to handle deprecated parameters and prevent similar issues in the future.
  • Monitor the gateway logs for the error pattern to ensure any changes are effective in preventing the retry loop and downstream issues.

Example

No code snippet is provided due to the lack of specific code details in the issue.

Notes

The solution may require updates to the OpenClaw codebase or configuration, which could involve collaborating with the development team or waiting for an official fix.

Recommendation

Apply a workaround by removing or updating the hardcoded temperature parameter, as upgrading to a fixed version is not mentioned as an option in the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix LCM compaction sends deprecated parameter to claude-opus-4-7, causing repeated API errors and retry loops [1 participants]