2026-03-23

Source

  • Type: local-file
  • Path: /home/topher/.openclaw/workspace-2890-bot/memory/2026-03-23.md
  • Bytes: 549
  • Updated: 2026-05-02T21:36:27.468Z

Content

# 2026-03-23
 
## Context Pruning Rule (85% Trigger)
- Topher asked for a new heartbeat rule at 85% context limit
- When triggered (~85K tokens):
  1. Save most recent 50% to `memory/context_snapshot_recent_*.md`
  2. Delete oldest 30% from session storage
  3. Log to `memory/context-log.md`
- Implemented in `scripts/context_monitor.py`
- Added TOKEN_PREEMPTIVE = 85000 constant
- New functions: `save_recent_context()`, `prune_oldest_context()`, `log_to_context_log()`
 
## Testing
- Script runs: `python3 scripts/context_monitor.py --check` → OK

Notes

  • No related pages yet.