Commit Graph

4 Commits

Author SHA1 Message Date
Claire
ecb351b901 feat(memoryFlush): add hard threshold for auto-execute backup command
Adds two new config options to memoryFlush:
- hardThresholdTokens: token count that triggers auto-execution
- hardThresholdCommand: shell command to run (e.g., kernle checkpoint save)

Flow:
1. Soft threshold (existing): prompts agent to save with context
2. Hard threshold (new): auto-executes command without agent involvement

This provides a safety net - agents get a chance to save with context at
soft threshold, but if they miss it, the hard threshold ensures state is
preserved before compaction.

Example config:
```json
{
  "memoryFlush": {
    "softThresholdTokens": 100000,
    "prompt": "Save your state to Kernle...",
    "hardThresholdTokens": 120000,
    "hardThresholdCommand": "kernle -a agent checkpoint save 'auto-backup'"
  }
}
```
2026-01-27 16:50:03 -08:00
Peter Steinberger
6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
Peter Steinberger
c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00
Peter Steinberger
7dbb21be8e feat: add pre-compaction memory flush 2026-01-12 05:29:18 +00:00