Summary
Add intelligent session switch reminders when context is running low and the user switches topics.
Proposed Behavior
| Condition |
Action |
| Context ≥80% + topic switch detected |
Prompt: "Want to start a new session?" |
| Context ≥95% |
Auto-switch to new session |
Topic Switch Detection
Obvious switches:
- Work → casual chat
- Technical → lifestyle
- Project A → Project B (completely different domains)
- User explicitly says "changing topics"
Not a switch:
- Deep dive on same topic
- Related topic extension
Benefits
- Prevent information loss from overly long sessions
- Keep each session focused on a clear theme
- Reduce context confusion from compaction
Implementation Ideas
- Add a topic tracking mechanism (could be simple keyword-based or LLM-based)
- Check context percentage before each response
- Provide UI prompt or auto-action based on rules
Use Case
I often work on multiple projects in one day. When switching from one project to another with 85% context used, I'd like to be asked if I want a fresh session, rather than having the previous project's context dilute the new discussion.
Environment:
- OpenClaw version: 2026.3.13
- Model: custom-coding-dashscope-aliyuncs-com/glm-5
Summary
Add intelligent session switch reminders when context is running low and the user switches topics.
Proposed Behavior
Topic Switch Detection
Obvious switches:
Not a switch:
Benefits
Implementation Ideas
Use Case
I often work on multiple projects in one day. When switching from one project to another with 85% context used, I'd like to be asked if I want a fresh session, rather than having the previous project's context dilute the new discussion.
Environment: