Bug Description
When a session grows large enough that the compaction step exceeds the 600-second timeout, subsequent messages to the same topic/chat create a brand new session with zero conversation history instead of resuming the existing one.
Steps to Reproduce
- Have a long-running session with many tool calls (in my case: 476 entries, 3.7MB session file, two compaction cycles)
- The compaction run times out at 600s:
[agent/embedded] embedded run timeout: runId=da8f3bc2-... sessionId=364ec54a-... timeoutMs=600000
[agent/embedded] using current snapshot: timed out during compaction runId=da8f3bc2-... sessionId=364ec54a-...
- Send a new message to the same topic after the session has been inactive for some time
- Expected: Session resumes with compacted context
- Actual: A completely new session ID is created. The session mapping in
sessions.json is overwritten, and the agent has zero context about prior work in that topic.
Impact
This is a total context loss event. The agent wakes up with no memory of the prior conversation and has to be told what was being discussed — which is exactly the worst user experience when the conversation was about session continuity issues.
Environment
- OpenClaw 2026.2.15
- Model: anthropic/claude-opus-4-6
- Channel: Telegram (forum group with topics)
- Session: 476 entries, 3.7MB, two prior compactions
- Compaction mode: safeguard
Suggestion
Either:
- Retry compaction with a longer timeout for very large sessions
- Keep the old session ID even if compaction fails (use the last successful compaction snapshot)
- At minimum, carry forward the last compaction summary into the new session so context isn't completely lost
Log Evidence
Old session: 364ec54a-5f05-441d-86e7-90630fb77bf8 (last message: 2026-02-16T09:59:40Z)
New session: f64ce7f9-0014-4990-b896-87e26f1c6b93 (first message: 2026-02-16T15:30:15Z)
Compaction timeout: 2026-02-16T09:02:40Z
Bug Description
When a session grows large enough that the compaction step exceeds the 600-second timeout, subsequent messages to the same topic/chat create a brand new session with zero conversation history instead of resuming the existing one.
Steps to Reproduce
sessions.jsonis overwritten, and the agent has zero context about prior work in that topic.Impact
This is a total context loss event. The agent wakes up with no memory of the prior conversation and has to be told what was being discussed — which is exactly the worst user experience when the conversation was about session continuity issues.
Environment
Suggestion
Either:
Log Evidence