Crawler Summary

session-health-monitor answer-first brief

Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. --- name: session-health-monitor description: Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. metadata: { "openclaw": { "emoji": "πŸ’“" } } --- Session Health Monitor v2.0 **Prevents 413 context overflow errors** through proactive token monitoring, com Published capability contract available. No trust telemetry is available yet. Last updated 2/24/2026.

Freshness

Last checked 2/24/2026

Best For

Contract is available with explicit auth and schema references.

Not Ideal For

session-health-monitor is not ideal for teams that need stronger public trust telemetry, lower setup complexity, or more explicit contract coverage before production rollout.

Evidence Sources Checked

editorial-content, capability-contract, runtime-metrics, public facts pack

Agent DossierGitHubSafety: 100/100

session-health-monitor

Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. --- name: session-health-monitor description: Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. metadata: { "openclaw": { "emoji": "πŸ’“" } } --- Session Health Monitor v2.0 **Prevents 413 context overflow errors** through proactive token monitoring, com

OpenClawself-declared

Public facts

6

Change events

1

Artifacts

0

Freshness

Feb 24, 2026

Verifiededitorial-contentNo verified compatibility signals

Published capability contract available. No trust telemetry is available yet. Last updated 2/24/2026.

Schema refs publishedTrust evidence available

Trust score

Unknown

Compatibility

OpenClaw

Freshness

Feb 24, 2026

Vendor

Kodatcg

Artifacts

0

Benchmarks

0

Last release

Unpublished

Executive Summary

Key links, install path, and a quick operational read before the deeper crawl record.

Verifiededitorial-content

Summary

Published capability contract available. No trust telemetry is available yet. Last updated 2/24/2026.

Setup snapshot

git clone https://github.com/KodaTCG/openclaw-session-health-monitor-skill.git
  1. 1

    Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.

  2. 2

    Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Evidence Ledger

Everything public we have scraped or crawled about this agent, grouped by evidence type with provenance.

Verifiededitorial-content
Vendor (1)

Vendor

Kodatcg

profilemedium
Observed Feb 24, 2026Source linkProvenance
Compatibility (2)

Protocol compatibility

OpenClaw

contractmedium
Observed Feb 24, 2026Source linkProvenance

Auth modes

api_key

contracthigh
Observed Feb 24, 2026Source linkProvenance
Artifact (1)

Machine-readable schemas

OpenAPI or schema references published

contracthigh
Observed Feb 24, 2026Source linkProvenance
Security (1)

Handshake status

UNKNOWN

trustmedium
Observed unknownSource linkProvenance
Integration (1)

Crawlable docs

6 indexed pages on the official domain

search_documentmedium
Observed Apr 15, 2026Source linkProvenance

Release & Crawl Timeline

Merged public release, docs, artifact, benchmark, pricing, and trust refresh events.

Self-declaredagent-index

Artifacts Archive

Extracted files, examples, snippets, parameters, dependencies, permissions, and artifact metadata.

Self-declaredGITHUB OPENCLEW

Extracted files

0

Examples

6

Snippets

0

Languages

typescript

Parameters

Executable Examples

bash

# 1. Copy Discord v3 template (recommended)
cp skills/session-health-monitor/templates/HEARTBEAT-discord-v3.md HEARTBEAT.md

# 2. Create durable state file
cp skills/session-health-monitor/templates/durable-state-template.md memory/durable-state.md

# 3. Restart gateway
openclaw gateway restart

bash

# Discord v2 (no idempotent compression)
cp skills/session-health-monitor/templates/HEARTBEAT-discord-v2.md HEARTBEAT.md

# Standard (web/CLI)
cp skills/session-health-monitor/templates/HEARTBEAT-standard.md HEARTBEAT.md

bash

# Add to crontab
crontab -e

# Discord: check every 30 minutes
*/30 * * * * /home/profeeder/.openclaw/workspace/skills/session-health-monitor/scripts/token-monitor.py

# Or for standard (web/CLI): every 2 hours
0 */2 * * * /home/profeeder/.openclaw/workspace/skills/session-health-monitor/scripts/token-monitor.py

bash

mkdir -p skills/session-health-monitor/data

markdown

<!-- COMPRESSED: 14:30 (120,000 tokens, warning level) -->
## Session Summary 14:30
[summary content]

text

session-health-monitor/
β”œβ”€β”€ SKILL.md (this file)
β”œβ”€β”€ config/
β”‚   └── channel-thresholds.json (Discord vs default thresholds)
β”œβ”€β”€ scripts/
β”‚   └── token-monitor.py (main monitoring script)
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ HEARTBEAT-discord.md (aggressive mode)
β”‚   └── HEARTBEAT-standard.md (normal mode)
└── data/
    └── monitor-state.json (runtime state)

Docs & README

Full documentation captured from public sources, including the complete README when available.

Self-declaredGITHUB OPENCLEW

Docs source

GITHUB OPENCLEW

Editorial quality

ready

Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. --- name: session-health-monitor description: Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. metadata: { "openclaw": { "emoji": "πŸ’“" } } --- Session Health Monitor v2.0 **Prevents 413 context overflow errors** through proactive token monitoring, com

Full README

name: session-health-monitor description: Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing. Discord-optimized with aggressive thresholds. v2.0 adds idempotent compression and durable state separation. metadata: { "openclaw": { "emoji": "πŸ’“" } }

Session Health Monitor v2.0

Prevents 413 context overflow errors through proactive token monitoring, compression, and sub-agent routing.

New in v2.0: βœ… Idempotent compression - Markers prevent re-compression
βœ… Durable state separation - Config/context never compressed
βœ… Safe retries - Multiple compressions don't lose data

Problem

Sessions have a 200K token limit. When exceeded, the session breaks with 413 errors. This is especially problematic in Discord due to:

  • Image uploads (10-30K tokens each)
  • Group chat history
  • Long multi-participant conversations

Solution

Channel-aware compression system with aggressive thresholds for Discord, standard for web/CLI.

Discord Mode (Aggressive)

  • 120K (60%): Warning + light compression + auto-route heavy tasks
  • 150K (75%): Critical compression + force all tasks to sub-agents
  • 170K (85%): Emergency mode + block images
  • 185K (92.5%): Lockdown mode

Standard Mode (Web/CLI)

  • 150K (75%): Warning
  • 170K (85%): Critical compression + sub-agents
  • 185K (92.5%): Emergency mode
  • 195K (97.5%): Lockdown mode

Features

βœ… Auto-compression to daily memory files
βœ… Git auto-commit after every compression
βœ… Sub-agent routing for heavy tasks (saves 70-90% tokens)
βœ… Image blocking at critical thresholds (Discord)
βœ… Channel-specific thresholds (Discord vs web/CLI)
βœ… Proactive monitoring (30 min for Discord, 2 hours standard)

Installation

Quick Start (v2.0)

# 1. Copy Discord v3 template (recommended)
cp skills/session-health-monitor/templates/HEARTBEAT-discord-v3.md HEARTBEAT.md

# 2. Create durable state file
cp skills/session-health-monitor/templates/durable-state-template.md memory/durable-state.md

# 3. Restart gateway
openclaw gateway restart

Legacy Templates (v1.0)

# Discord v2 (no idempotent compression)
cp skills/session-health-monitor/templates/HEARTBEAT-discord-v2.md HEARTBEAT.md

# Standard (web/CLI)
cp skills/session-health-monitor/templates/HEARTBEAT-standard.md HEARTBEAT.md

2. Set Up Monitoring Cron

# Add to crontab
crontab -e

# Discord: check every 30 minutes
*/30 * * * * /home/profeeder/.openclaw/workspace/skills/session-health-monitor/scripts/token-monitor.py

# Or for standard (web/CLI): every 2 hours
0 */2 * * * /home/profeeder/.openclaw/workspace/skills/session-health-monitor/scripts/token-monitor.py

3. Initialize Data Directory

mkdir -p skills/session-health-monitor/data

How It Works

1. Token Monitoring

Every heartbeat (or cron interval), the agent:

  1. Checks session_status for current token count
  2. Compares against channel-specific thresholds
  3. Triggers compression if needed

2. Compression (v2.0 Idempotent)

When threshold hit:

  1. Checks for existing compression marker for this level today
  2. If already compressed at this level β†’ skip (idempotent)
  3. If not β†’ summarizes recent messages (50-150 depending on severity)
  4. Adds compression marker with timestamp and token count
  5. Appends to daily file (preserves earlier compressions)
  6. Extracts important context to durable state (config, decisions, tasks)
  7. Commits and pushes to GitHub
  8. Alerts user with appropriate message

Compression Marker Format:

<!-- COMPRESSED: 14:30 (120,000 tokens, warning level) -->
## Session Summary 14:30
[summary content]

3. Sub-Agent Routing

At elevated token levels:

  • Discord 120K+: Auto-route heavy tasks (market analysis, reports, etc.)
  • Discord 150K+: Force ALL tasks to sub-agents
  • Standard 150K+: Auto-route heavy tasks
  • Standard 170K+: Force ALL tasks to sub-agents

Why sub-agents save tokens:

  • Main session only sees spawn request (~500 tokens) + result (~5K tokens)
  • Sub-agent does heavy work in isolation (~80K tokens)
  • Net savings: ~75K tokens (93% reduction)

4. Image Blocking (Discord)

At 170K tokens (Discord only):

  • Block image uploads with explanation
  • Offer alternatives: image links, sub-agent analysis, session reset

Files

session-health-monitor/
β”œβ”€β”€ SKILL.md (this file)
β”œβ”€β”€ config/
β”‚   └── channel-thresholds.json (Discord vs default thresholds)
β”œβ”€β”€ scripts/
β”‚   └── token-monitor.py (main monitoring script)
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ HEARTBEAT-discord.md (aggressive mode)
β”‚   └── HEARTBEAT-standard.md (normal mode)
└── data/
    └── monitor-state.json (runtime state)

Configuration

Edit config/channel-thresholds.json to adjust:

  • Warning/critical/emergency thresholds
  • Compression depth (messages to compress)
  • Heartbeat interval
  • Image blocking threshold
  • Sub-agent routing triggers

User Education

Add to your server/workspace welcome:

Discord:

🐻 Koda - Discord Session Tips

Discord burns tokens 3-5x faster than other platforms due to images and group chat.

Auto-protections enabled: βœ… Aggressive compression at 60% capacity βœ… Auto-route heavy tasks to sub-agents βœ… Block images at 85% (prevents crashes)

You can help:

  • Share image links instead of uploads
  • Reset chat periodically (I auto-backup to GitHub)
  • Let me handle big tasks via sub-agents

You won't lose work β€” everything saves to memory + GitHub.

Testing

# Test compression manually
python3 skills/session-health-monitor/scripts/token-monitor.py

# Check state
cat skills/session-health-monitor/data/monitor-state.json

# View compression history
cat memory/$(date +%Y-%m-%d).md

Maintenance

  • Daily memory files: Auto-created in memory/YYYY-MM-DD.md
  • Git commits: Auto-pushed after each compression
  • State file: Updated every check with current token count
  • Old memory files: Keep or archive as needed (auto-backed to GitHub)

Troubleshooting

Q: Agent not compressing even at threshold?

  • Check cron is running: crontab -l
  • Verify HEARTBEAT.md exists and is correct template
  • Check data/monitor-state.json for last check time

Q: Too aggressive for my use case?

  • Edit config/channel-thresholds.json to raise thresholds
  • Switch to standard template instead of Discord template

Q: Sub-agents not triggering?

  • Verify agent has sessions_spawn capability
  • Check task matches routing keywords in HEARTBEAT.md

Future Enhancements

  • [ ] Auto-detect channel type (no manual template selection)
  • [ ] Configurable compression strategies (summary vs deletion)
  • [ ] Multi-session health dashboard
  • [ ] Predictive token usage alerts
  • [ ] Integration with OpenClaw core (make default behavior)

Credits

Built by Koda (Feb 2026) for Pro to solve Discord 413 overflow issues.

License

MIT - Free to use, modify, and share.

v2.0 Features

Idempotent Compression

Problem: Running compression twice on the same data re-summarizes already-compressed content, losing detail.

Solution: Compression markers prevent re-compression.

How it works:

  1. Before compressing, check for marker: grep "<!-- COMPRESSED:" memory/2026-02-15.md
  2. If marker exists for this severity level β†’ skip
  3. If not β†’ compress and add marker
  4. Multiple compressions per day = multiple summaries appended, not replaced

Benefits:

  • Safe to retry compression
  • No data loss from double-compression
  • Clear audit trail of when compression happened
  • Stable summary schema

Durable State Separation

Problem: Aggressive compression might delete important long-term context (API keys, config, decisions).

Solution: Separate files for different memory types.

File Structure:

memory/
  2026-02-15.md          # Thread summaries (compress aggressively)
  durable-state.md       # Never compress (config, decisions, tasks)
  context/               # Optional domain-specific data

What goes in durable state:

  • API keys and credentials
  • Important decisions and why they were made
  • Active tasks and todos
  • Skill configurations
  • Critical context that must survive compression

What goes in daily files:

  • Conversational history
  • Task execution logs
  • Temporary context
  • Session-specific data

Compression rules:

  • Daily files: Compress at thresholds
  • Durable state: NEVER compress (append-only)
  • Context files: Review periodically, compress if stale (>30 days)

Benefits

Idempotent + Durable State together:

  • βœ… Safe retries (no double-compression)
  • βœ… Important context preserved (durable state)
  • βœ… Thread history compressed (token savings)
  • βœ… Clear audit trail (markers)
  • βœ… Organized memory (thread vs config vs context)

Contract & API

Machine endpoints, protocol fit, contract coverage, invocation examples, and guardrails for agent-to-agent use.

Verifiedcapability-contract

Contract coverage

Status

ready

Auth

api_key

Streaming

No

Data region

global

Protocol support

OpenClaw: self-declared

Requires: openclew, lang:typescript

Forbidden: none

Guardrails

Operational confidence: medium

Contract is available with explicit auth and schema references.
Trust confidence is not low and verification freshness is acceptable.
Invocation examples
curl -s "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/snapshot"
curl -s "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract"
curl -s "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/trust"

Reliability & Benchmarks

Trust and runtime signals, benchmark suites, failure patterns, and practical risk constraints.

Missingruntime-metrics

Trust signals

Handshake

UNKNOWN

Confidence

unknown

Attempts 30d

unknown

Fallback rate

unknown

Runtime metrics

Observed P50

unknown

Observed P95

unknown

Rate limit

unknown

Estimated cost

unknown

No benchmark suites or observed failure patterns are available.

Media & Demo

Every public screenshot, visual asset, demo link, and owner-provided destination tied to this agent.

Missingno-media
No screenshots, media assets, or demo links are available.

Related Agents

Neighboring agents from the same protocol and source ecosystem for comparison and shortlist building.

Self-declaredprotocol-neighbors
Github ReposUpdated 12h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation β€’ (~400 MCP servers for AI agents) β€’ AI Automation / AI Agent with MCPs β€’ AI Workflows & AI Agents β€’ MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW
Machine Appendix

Contract JSON

{
  "contractStatus": "ready",
  "authModes": [
    "api_key"
  ],
  "requires": [
    "openclew",
    "lang:typescript"
  ],
  "forbidden": [],
  "supportsMcp": false,
  "supportsA2a": false,
  "supportsStreaming": false,
  "inputSchemaRef": "https://github.com/KodaTCG/openclaw-session-health-monitor-skill#input",
  "outputSchemaRef": "https://github.com/KodaTCG/openclaw-session-health-monitor-skill#output",
  "dataRegion": "global",
  "contractUpdatedAt": "2026-02-24T19:43:09.088Z",
  "sourceUpdatedAt": "2026-02-24T19:43:09.088Z",
  "freshnessSeconds": 19655303
}

Invocation Guide

{
  "preferredApi": {
    "snapshotUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/snapshot",
    "contractUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "trustUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/trust"
  },
  "curlExamples": [
    "curl -s \"https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/snapshot\"",
    "curl -s \"https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract\"",
    "curl -s \"https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/trust\""
  ],
  "jsonRequestTemplate": {
    "query": "summarize this repo",
    "constraints": {
      "maxLatencyMs": 2000,
      "protocolPreference": [
        "OPENCLEW"
      ]
    }
  },
  "jsonResponseTemplate": {
    "ok": true,
    "result": {
      "summary": "...",
      "confidence": 0.9
    },
    "meta": {
      "source": "GITHUB_OPENCLEW",
      "generatedAt": "2026-10-10T07:31:32.923Z"
    }
  },
  "retryPolicy": {
    "maxAttempts": 3,
    "backoffMs": [
      500,
      1500,
      3500
    ],
    "retryableConditions": [
      "HTTP_429",
      "HTTP_503",
      "NETWORK_TIMEOUT"
    ]
  }
}

Trust JSON

{
  "status": "unavailable",
  "handshakeStatus": "UNKNOWN",
  "verificationFreshnessHours": null,
  "reputationScore": null,
  "p95LatencyMs": null,
  "successRate30d": null,
  "fallbackRate": null,
  "attempts30d": null,
  "trustUpdatedAt": null,
  "trustConfidence": "unknown",
  "sourceUpdatedAt": null,
  "freshnessSeconds": null
}

Capability Matrix

{
  "rows": [
    {
      "key": "OPENCLEW",
      "type": "protocol",
      "support": "unknown",
      "confidenceSource": "profile",
      "notes": "Listed on profile"
    },
    {
      "key": "help",
      "type": "capability",
      "support": "supported",
      "confidenceSource": "profile",
      "notes": "Declared in agent profile metadata"
    }
  ],
  "flattenedTokens": "protocol:OPENCLEW|unknown|profile capability:help|supported|profile"
}

Facts JSON

[
  {
    "factKey": "docs_crawl",
    "category": "integration",
    "label": "Crawlable docs",
    "value": "6 indexed pages on the official domain",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  },
  {
    "factKey": "vendor",
    "category": "vendor",
    "label": "Vendor",
    "value": "Kodatcg",
    "href": "https://github.com/KodaTCG/openclaw-session-health-monitor-skill",
    "sourceUrl": "https://github.com/KodaTCG/openclaw-session-health-monitor-skill",
    "sourceType": "profile",
    "confidence": "medium",
    "observedAt": "2026-02-24T19:43:14.176Z",
    "isPublic": true
  },
  {
    "factKey": "protocols",
    "category": "compatibility",
    "label": "Protocol compatibility",
    "value": "OpenClaw",
    "href": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "sourceUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "sourceType": "contract",
    "confidence": "medium",
    "observedAt": "2026-02-24T19:43:09.088Z",
    "isPublic": true
  },
  {
    "factKey": "auth_modes",
    "category": "compatibility",
    "label": "Auth modes",
    "value": "api_key",
    "href": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "sourceUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "sourceType": "contract",
    "confidence": "high",
    "observedAt": "2026-02-24T19:43:09.088Z",
    "isPublic": true
  },
  {
    "factKey": "schema_refs",
    "category": "artifact",
    "label": "Machine-readable schemas",
    "value": "OpenAPI or schema references published",
    "href": "https://github.com/KodaTCG/openclaw-session-health-monitor-skill#input",
    "sourceUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/contract",
    "sourceType": "contract",
    "confidence": "high",
    "observedAt": "2026-02-24T19:43:09.088Z",
    "isPublic": true
  },
  {
    "factKey": "handshake_status",
    "category": "security",
    "label": "Handshake status",
    "value": "UNKNOWN",
    "href": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/trust",
    "sourceUrl": "https://www.xpersona.co/api/v1/agents/kodatcg-openclaw-session-health-monitor-skill/trust",
    "sourceType": "trust",
    "confidence": "medium",
    "observedAt": null,
    "isPublic": true
  }
]

Change Events JSON

[
  {
    "eventType": "docs_update",
    "title": "Docs refreshed: Sign in to GitHub Β· GitHub",
    "description": "Fresh crawlable documentation was indexed for the official domain.",
    "href": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceUrl": "https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenclaw%2Fskills%2Ftree%2Fmain%2Fskills%2Fasleep123%2Fcaldav-calendar",
    "sourceType": "search_document",
    "confidence": "medium",
    "observedAt": "2026-04-15T05:03:46.393Z",
    "isPublic": true
  }
]

Sponsored

Ads related to session-health-monitor and adjacent AI workflows.