Alerting: support custom agent event types in AGENT_LIFECYCLE condition #145
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The
AGENT_LIFECYCLEalert condition (introduced in the agent-lifecycle-conditions feature) ships with a strict allowlist of event types:REGISTEREDRE_REGISTEREDDEREGISTEREDWENT_STALEWENT_DEADRECOVEREDAgents can also post arbitrary event types via
POST /api/v1/data/events(handled byEventIngestionController), which end up in the sameagent_eventsClickHouse table. Today those custom event types cannot be selected in an alert rule — the allowlist rejects anything outside the six entries above.Why we shipped strict first
eventType = "REGISTER"(missingED) would look valid in the UI but match zero rows forever.What's needed
SELECT DISTINCT event_type FROM agent_events WHERE tenant_id = ? AND timestamp > now() - INTERVAL 30 DAY).Acceptance criteria
AgentLifecycleCondition.eventTypeswithout losing the typo safety net..claude/rules/updated to document the mechanism.Priority
Backlog — the six lifecycle events cover the core "agent outage / restart" use cases. Custom events are a "nice to have" for agents emitting domain-specific signals.