| name | proactive-suggestion-engine |
| description | Proactive failure pattern detection — monitors cron jobs, subagent failures, and repeated errors; offers investigations before user notices |
Proactive Suggestion Engine
How It Works
Failure Event → Error Parser → Pattern Counter → Confidence Score
↓
Suggestion Generator ← Pattern Match (≥ 3x)
↓
User Notification (only if confidence ≥ medium)
Error Pattern Types
| Type | Source | Detection Method |
|---|
| Cron failure | cron output logs | exit code != 0 |
| Subagent failure | task traces | exit_reason in [failed, max_iterations] |
| API error | logs/agent.log | repeated same error string |
| Skill failure | skill execution output | unexpected output format |
| Network error | logs | ETIMEDOUT, ConnectionRefused |
Suggestion Examples
Low confidence (mention in passing):
"Noticed a couple of API timeouts in the logs lately — likely transient, let me know if it happens again."
Medium confidence (offer investigation):
"⚠️ The cron-wrapper.sh has failed 3 times with predicate errors. Last time: shell:"false" exit code 1. Want me to investigate the predicate evaluation logic?"
High confidence (recommend investigation):
"🔴 VPS gateway has failed 5 times in 24h — all with ETIMEDOUT on Telegram. This looks like a network-level issue. Recommend running openclaw-telegram-etimedout-fix. Want me to apply it now?"
Integration
Run proactively:
python3 ~/.hermes/skills/automation/proactive-suggestion-engine/scripts/detector.py
Or import the detector into any skill/post-processing step.