ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

session-health-monitor

Context window health monitoring for OpenClaw agents — threshold warnings via Telegram, pre-compaction snapshots, and memory rotation.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/assistantheinrich-prog/session-health-monitor
Or

What This Skill Does

The session-health-monitor is a vital diagnostic and management utility for OpenClaw agents. Its primary function is to provide real-time telemetry regarding the agent's context window usage. By tracking percentage-based capacity and compaction history, it empowers agents to manage their own memory longevity. It automatically triggers 'Pre-Compaction Snapshots'—a feature that captures critical progress, technical decisions, and file changes before the internal LLM context is compressed or cleared. Additionally, it implements a smart notification system via Telegram, ensuring that the human supervisor remains aware of session health, preventing unexpected task termination due to overflow.

Installation

  1. Add the skill reference to your shared/INDEX.md file: | Context window health, compaction detection, pre-compaction snapshots | skill-session-health.md |.
  2. Create the documentation file shared/skill-session-health.md using the provided template to define the thresholds and behavioral expectations for the agent.
  3. Integrate the heartbeat step into your agent's primary execution loop to ensure the session_status function is called consistently.
  4. Run the installation command in your terminal: clawhub install openclaw/skills/skills/assistantheinrich-prog/session-health-monitor.

Use Cases

  • Long-running Development Tasks: When working on complex codebases, agents often reach context limits. This skill ensures key logic and TODOs are saved to memory before context loss occurs.
  • Autonomous Research Agents: Useful for agents scouring the web, as it tracks context growth and archives findings before session truncation.
  • Remote Session Stability: Provides an early-warning system for users via Telegram, so they know exactly when a session requires a restart or manual memory cleanup.

Example Prompts

  1. "Check the current session-health-monitor status and tell me if I need to perform a cleanup before starting this refactor."
  2. "Review the last three pre-compaction snapshots and summarize the key decisions made during the session."
  3. "Summarize the current context window usage and confirm if the Telegram notifications are active for current thresholds."

Tips & Limitations

  • Proactive Management: Do not ignore the RED status notifications; if the agent flags urgency, perform a memory reset or snapshot immediately to avoid losing context-sensitive state.
  • Storage Hygiene: The memory rotation feature helps keep your repository clean, but ensure you have an external backup if your agent is processing mission-critical data.
  • Threshold Tuning: While the defaults are safe for most workflows, you can tune the thresholds in the skill-session-health.md file if your specific task requires a different sensitivity level for compaction warnings.

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-assistantheinrich-prog-session-health-monitor": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#context-management#telemetry#memory#monitoring#automation
Safety Score: 4/5

Flags: file-write, file-read, code-execution