Skip to content

Feature: Smart session switch reminder based on context usage and topic change #47812

@xuhe83-cyber

Description

@xuhe83-cyber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions