You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Alert when a run's token use is far above the baseline for its repository and model #3439
The only cost alert is a per-execution threshold that writes to a Redis list nothing reads. A run that burns several times the usual tokens goes unnoticed until the bill or the limit.
Goal
Detect outlier runs against ProPR's own history and tell the operator.
Acceptance criteria
After an execution is recorded, its total tokens are compared with the baseline for the same repository, model and execution type: the median of the last N successful executions (default 20, minimum 8 before any alert).
An alert fires when tokens exceed a multiple of the baseline (instance setting, default 4x) and an absolute floor, so small runs never alert.
The alert is an Inbox notification with severity warning, deduplicated per task, linking to the task, stating observed versus baseline. It reuses an existing notification kind.
An optional instance setting pauses scheduled automations for that repository after M alerts within a window (default off).
The settings follow the standard instance-setting pattern (loader, validation, settings catalog, MCP update_execution_settings, CLI).
The baseline query is indexed or cached so recording an execution does not slow down.
The existing unread high-cost Redis list is either wired to the same notification or removed.
Tests cover baseline computation, the threshold, the minimum-history guard, deduplication and the setting.
Implementation
Key files: packages/core/src/utils/llmMetrics.ts (recordLLMMetrics, checkCostThreshold), packages/core/src/services/notificationService.ts, src/jobs/runCostCap.ts (notifySpendCap precedent), settings pattern in packages/core/src/config/, packages/api/routes/configSettings.ts, packages/api/routes/configHelpers.ts (SPECIALIZED_SETTING_NAMES), packages/api/mcp/settingsCatalog.ts, packages/cli/src/api/settings.ts, packages/core/src/services/agents/agentRunCostGate.ts (automation pause precedent). Verify with the standard commands.
Activity
propr-dev commentedon Nov 12, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53439/claude-opus-5-5-alert-when-a-run-s-token--20261112-1031-e9d3437-epic-cost-visibility-oluissue-3439-20261112-1031-claude-opus-5-5-e9d🔍 Track Task Execution
I've implemented #3439. After a run is recorded, its total tokens are…