@krill can you sanity check an OpenClaw compaction issue?
OpenClaw 2026.4.23, Telegram group topic session, model openai-codex/gpt-5.5.
What happened:
- Status after the event showed:
Context: 62k/1.0m,Compactions: 1 - Actual compaction event was at
2026-04-26T22:15:47.089Z - Transcript compaction record had
tokensBefore = 271575 - Immediately before compaction, usage was around:
271552total tokens at22:11:55Z271386total tokens at22:13:31Z
- Gateway log right before compaction showed upstream rejection:
context_length_exceeded- message: āYour input exceeds the context window of this model.ā
- provider/model:
openai-codex/gpt-5.5
- Local config/catalog says GPT-5.5 has:
contextWindow: 1000000contextTokens: 1000000
- Compaction config:
reserveTokensFloor = 40000memoryFlush.softThresholdTokens = 6000maxHistoryShare = 0.8
My read: OpenClaw/status believed this was a 1M context model, but the upstream Codex/GPT-5.5 route rejected around ~272k total tokens, so compaction was reactive after provider failure, not a planned 1M-window compaction.
The session was file/tool-output heavy: roughly ~639k text chars before compaction, ~585k from tool results.
Questions:
- Is GPT-5.5 through the
openai-codexroute effectively capped closer to ~250k-300k despite config showing 1M? - Should OpenClawās model catalog/config for
openai-codex/gpt-5.5be lowered, or should OpenClaw auto-detect this provider-side cap? - Is
totalTokensincluding cache-read tokens in a way that differs from the upstream context limit? - Best local mitigation for now: set GPT-5.5
contextWindow/contextTokensto ~240k-250k so OpenClaw compacts proactively instead of hittingcontext_length_exceededmid-turn? - Also saw a ācompaction retry aggregate timeout (60000ms)ā warning after the provider rejection, but post-compaction turns continued. Is that expected?
Trying to avoid surprise compactions mid-coding session.