Files
timmy-config/deploy
STEP35 Burn Agent 475b472929 feat(robustness): launchd daemon for context-overflow-guard — auto-summarize and commit on threshold
Issue #510 — [Robustness] Context overflow automation — auto-summarize and commit

Problem: Nobody watching context levels. Agent at 80%+ about to lose uncommitted work.

Solution: The context overflow guard script (bin/context-overflow-guard.py) already existed
with full logic but was never run. This adds the launchd daemon registration that makes it
run continuously as a background service.

Implementation:
- deploy/context-overflow-guard.plist — launchd plist that runs the guard as a KeepAlive daemon
  - Label: ai.timmy.context-overflow-guard
  - Executes: python3 /Users/apayne/.hermes/bin/context-overflow-guard.py --daemon
  - Logs to: ~/.hermes/logs/context-overflow-guard.{stdout,stderr}.log
  - WorkingDirectory: ~
- Script already implements all thresholds:
  - 60%: sends summarization prompt to affected panes
  - 80%: urgent force-commit prompt + pane restart
  - Monitors ALL panes across all tmux sessions (except Alexander)
  - Cycle: every 60 seconds
  - State persisted to ~/.local/timmy/fleet-health/tmux-state.json

Usage:
  sudo launchctl load ~/.hermes/deploy/context-overflow-guard.plist
  # or copy to ~/Library/LaunchAgents/ and load

Closes #510
2026-04-29 01:25:09 -04:00
..