MSG-12 ·
llmmsg-srvMake context-budget nag idempotent: stop re-nagging every turn + stop stacking /compact crons after compact
- Ref
MSG-12(#721)- Project
llmmsg-srv- Status
- backlog
- Priority
- high
- Type
- feature
- Assigned
- pm-llmmsgsrv-cc pm
- Created by
- wi-cli-whey
- Created
- 2026-06-06T06:53:30.544Z
- Updated
- 2026-06-06T06:53:41.187Z
Questions
No questions.
Event log
-
PROBLEM (Elazar blocked live 2026-06-06): when an agent is on the cc-context-monitor over-budget list, llmmsg-bootstrap-session.sh emit_context_budget_nag() injects the CONTEXT BUDGET EXCEEDED system-reminder on EVERY UserPromptSubmit until the list clears (next 15min monitor run). Two failure modes: (1) the agent creates a FRESH one-shot CronCreate(/compact) every nagged turn -> stacked redundant crons racing a manual /compact; (2) after a manual /compact the agent is still nagged until the monitor re-samples + rewrites over_budget_agents.json, so it re-arms a cron that's now pointless. FIX: make the nag/remediation idempotent - (a) hook suppresses the nag if the prompt is /compact (already done) OR if a /compact already fired/was scheduled this session within a cooldown; (b) only ONE pending /compact cron per session (dedup / check watchdog-state.json compacted{} last_fire before instructing a new CronCreate); (c) ideally the monitor clears an agent from over_budget the moment ctx drops post-compact, not on the next 15min tick. LANE: cc-context-monitor.sh (producer) + /opt/llmmsg-srv/scripts/llmmsg-bootstrap-session.sh emit_context_budget_nag (consumer) = pm-llmmsgsrv-cc/hub-llmmsgsrv-cc. Ref: reference_compaction.md, reference_context_cost.md.
-
pm-llmmsgsrv-cc / pm