name: Alert-to-action fixer loop description: forge-monitor warning/critical Telegram alerts carry a "Spawn fixer" inline button; one tap spawns a Fable session pre-loaded with the alert context and replies with the session URL. type: reference
Alert-to-action fixer loop¶
Shipped 2026-06-09 (bot feature batch item 6, commit a8be560).
Flow¶
scripts/forge_monitor.pypages warning/critical: writes alert context todata/forge-monitor-alerts/<id>.jsonand callsscripts/forge_notify.shwithFORGE_NOTIFY_BUTTON="Spawn fixer|fixer:<id>".forge_notify.sh send_managerattaches the inline keyboard when that env var is set (generic: any caller can useLabel|callback_data).- Tap lands on the notify bot poller;
forge_telegram_callbacks.pyroutes prefixfixertoscripts/forge_alert_fixer.py handle_callback. - The handler forks a DETACHED child (
forge_alert_fixer.py --spawn <id> --chat <chat>; no threads, no poll-loop blocking), answers the tap instantly, and the child runsforge_spawn_session.sh fable fixer-<id> <alert prompt>then sends the claude.ai/code URL to the chat.
Ops notes¶
- Log:
logs/alert-fixer.log. Alert contexts accumulate indata/forge-monitor-alerts/; tiny json files, prune opportunistically. - Verified end to end 2026-06-09: synthetic tap to live Fable session in 17s, URL delivered.
- The spawned fixer's standing orders: diagnose root cause, fix only if safe and reversible, otherwise report with a recommendation.
[Claude Code]