-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Session context silently lost between consecutive turns with z.ai provider (GLM gateway) #76665
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
Session conversation history is silently dropped between consecutive user messages when using
zai/glm-5.1(z.ai-style provider). The first user message and its assistant reply disappear from the session file when the second user message arrives, causing the agent to lose all context.Environment
2026.5.2 (8b2a6e5)@larksuite/openclaw-lark)zai/glm-5.1Reproduction
zai/glm-5.1default model)Evidence from session store
First backup (
61318122-...jsonl.bak-97174-1777807809142, 7 lines):Second backup (
61318122-...jsonl.bak-97174-1777807887760, created ~78s later after docx upload):Between the two backups (78 seconds apart), the session file was rewritten: the first user message + assistant reply were silently removed. The
model_changeentry (line 1) was preserved, suggesting the session metadata survived but conversation history did not.Configuration
{ "agents": { "defaults": { "model": { "primary": "zai/glm-5.1" }, "contextPruning": { "mode": "cache-ttl", "ttl": "5m", "keepLastAssistants": 3, "minPrunableToolChars": 30000, "hardClear": { "enabled": true } } } }, "session": { "dmScope": "per-channel-peer", "maintenance": { "mode": "enforce", "maxEntries": 50, "pruneAfter": "2h" }, "reset": { "mode": "idle", "idleMinutes": 999999 } } }The
session.reset.idleMinutes: 999999rules out idle reset as the cause (78s gap is nowhere near the threshold).pruneAfter: 2halso does not explain losing context within seconds.Related
Impact
Expected Behavior
Session history should accumulate across turns. Prior messages should never be silently dropped without explicit user action (e.g.,
/new) or configured reset/cleanup thresholds being met.