openclaw - 💡(How to fix) Fix [Bug]: Telegram direct sessions show corrupted context window/accounting for Anthropic Opus, including 41k/33k (127%), while direct Anthropic API 1M beta works [1 comments, 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#61975Fetched 2026-04-08 03:10:34
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1

Code Example

{
  "agents": {
    "defaults": {
      "models": {
        "anthropic/claude-opus-4-6": {
          "params": { "context1m": true }
        }
      }
    }
  }
}

### Steps to reproduce


Start a fresh Telegram direct conversation
Send a simple message
Run:
Copy
openclaw status --deep
Observe Telegram session row reporting broken values like:
41k/33k (127%)
unknown/200k

### Expected behavior

Fresh Telegram sessions on Anthropic Opus should report context consistently and should not show impossible states like 41k/33k (127%).



### Actual behavior

<img width="499" height="932" alt="Image" src="https://github.com/user-attachments/assets/fffe9ed0-71aa-4413-bd3e-942e6ab768a1" />

### OpenClaw version

OpenClaw 2026.4.5 (3e72c03)

### Operating system

macOS 26.4

### Install method

_No response_

### Model

Opus 4.6

### Provider / routing chain

Anthropic API

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Version

  • OpenClaw 2026.4.5 (3e72c03)
  • Previously reproduced on 2026.4.1 as well

Environment

  • macOS
  • Telegram channel enabled
  • Anthropic auth via real API key, not OAuth/setup-token
  • Model configured: anthropic/claude-opus-4-6
  • params.context1m: true enabled in ~/.openclaw/openclaw.json

What is happening

Fresh Telegram direct sessions are created with broken context/session accounting. /status and openclaw status --deep show inconsistent/corrupt token windows for Telegram sessions, such as:

  • 41k/33k (127%)
  • unknown/200k
  • sometimes “backing session missing” in the UI

At the same time:

  • Anthropic Sonnet cron sessions correctly show 1000k
  • direct raw Anthropic API calls with anthropic-beta: context-1m-2025-08-07 succeed on the same API key
  • so the Anthropic key and 1M beta access are not the problem

Why this looks wrong

41k/33k (127%) is impossible as a real context window and strongly suggests corrupted session metadata or bad Telegram-specific session accounting.

Repro

  1. Configure Anthropic API key auth
  2. Set anthropic/claude-opus-4-6 as primary model
  3. Set:
{
  "agents": {
    "defaults": {
      "models": {
        "anthropic/claude-opus-4-6": {
          "params": { "context1m": true }
        }
      }
    }
  }
}

### Steps to reproduce


Start a fresh Telegram direct conversation
Send a simple message
Run:
Copy
openclaw status --deep
Observe Telegram session row reporting broken values like:
41k/33k (127%)
unknown/200k

### Expected behavior

Fresh Telegram sessions on Anthropic Opus should report context consistently and should not show impossible states like 41k/33k (127%).



### Actual behavior

<img width="499" height="932" alt="Image" src="https://github.com/user-attachments/assets/fffe9ed0-71aa-4413-bd3e-942e6ab768a1" />

### OpenClaw version

OpenClaw 2026.4.5 (3e72c03)

### Operating system

macOS 26.4

### Install method

_No response_

### Model

Opus 4.6

### Provider / routing chain

Anthropic API

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The most likely fix is to investigate and correct the session metadata or Telegram-specific session accounting in OpenClaw.

Guidance

  • Verify that the params.context1m setting is correctly applied to the Anthropic Opus model in the openclaw.json file.
  • Check the OpenClaw logs for any errors or warnings related to session management or Telegram integration.
  • Test the Anthropic API directly with the same API key and model to ensure that the issue is specific to OpenClaw.
  • Review the OpenClaw configuration and code to ensure that the Telegram session accounting is correctly implemented.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue may be related to a regression in OpenClaw version 2026.4.5, as it was previously reproduced on version 2026.4.1. The fact that Anthropic Sonnet cron sessions work correctly suggests that the issue is specific to Telegram direct sessions.

Recommendation

Apply a workaround by disabling the params.context1m setting or downgrading to a previous version of OpenClaw, as the issue may be related to a regression in the current version.

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…

FAQ

Expected behavior

Fresh Telegram sessions on Anthropic Opus should report context consistently and should not show impossible states like 41k/33k (127%).

Still need to ship something?

×6

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

Back to top recommendations

TRENDING