Provide an actionable baseline for operating agent-control-plane reliably in production.
- DB posture:
- Local/dev: SQLite is acceptable for single-process execution.
- Production: use Postgres for concurrent workers, durability controls, and operational tooling.
- Startup order:
- Register models and initialize schema.
- Run crash recovery and timeout escalation scans.
- Start serving traffic only after recovery checks complete.
- Transaction posture:
- Route all control-plane mutations through facade/engine calls inside a UoW.
- Do not bypass engines with direct ORM writes for session/ticket/event state transitions.
- Review active sessions and stuck-cycle indicators.
- Review pending approvals and timeout aging.
- Review budget denials and budget exhaustion events.
- Review token budget denials and model access denials per identity.
- Confirm kill switch is not unintentionally active.
- Review command-idempotency behavior for repeated operator actions.
- Validate approval scope constraints (resource, count, expiry).
- Validate budget thresholds against observed usage.
- Validate token budget configs per identity/org/team against observed token consumption.
- Validate kill-switch procedures via tabletop or dry-run.
- Review repeated denial reasons for policy tuning.
- Verify backups and restore drills for control-plane tables.
Minimum signals to monitor:
- session counts by status (
created,active,paused,aborted,completed) - pending approvals and age percentiles
- budget denials/exhaustions per time window
- token budget denials per identity/org/team
- model access denials by model tier
- kill-switch triggers by scope
- stuck-cycle recovery counts
- event append failures segmented by
state_bearing
Recommended alerts:
- sustained growth in pending approvals
- spikes in budget exhaustion or kill-switch events
- any state-bearing persistence failures
- stuck active cycles beyond expected recovery window
- Contain:
- Trigger kill switch at smallest safe scope (session first, then agent/system if needed).
- Capture:
- Record affected session IDs, correlation IDs, event seq range, and operator command IDs.
- Stabilize:
- Deny or expire pending approvals for affected sessions.
- Pause active sessions if further investigation is required.
- Diagnose:
- Replay events and verify policy snapshot, guardrail outcomes, and budget timeline.
- Recover:
- Resume or recreate sessions after policy/config correction and explicit operator validation.
- Triage by risk/age/session priority.
- Deny stale or no-longer-valid requests.
- Confirm timeout escalation is functioning.
- Review policy thresholds and auto-approve conditions for obvious bottlenecks.
- Enter safe mode:
- Treat state-bearing write failures as hard failures.
- Pause entrypoints that would create unsafe partial progress.
- Verify blast radius:
- Determine whether failures are isolated or systemic across workers.
- Restore service:
- Recover DB availability first, then run recovery checks before resuming normal traffic.
- Post-incident:
- Validate event sequence continuity and no orphaned active cycles.
- Confirm operator actions are idempotent when retried.
session_idevent_seqevent_kindagent_idcorrelation_ididempotency_key- policy/routing reason
- budget deltas and remaining headroom