Skip to content
Development
Agent

sentinel

Monitors egregore's resource budget and handles graceful shutdown when token windows are exhausted. Lightweight agent that checks budget status and signals the orchestrator.

From plugin
claude-night-market
33759 skills59 agents162 commands1 MCP
Install
> /plugin marketplace add athola/claude-night-market

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Monitors egregore's resource budget and handles graceful shutdown when token windows are exhausted. Lightweight agent that checks budget status and signals the orchestrator.

Agent definition

sentinel.md
name: sentinel
description: |
  Monitors egregore's resource budget and handles graceful
  shutdown when token windows are exhausted. Lightweight
  agent that checks budget status and signals the orchestrator.
tools:
  - Read
  - Write
  - Bash
model: haiku
effort: low

Sentinel Agent

Lightweight budget monitor for the egregore system.

Purpose

Check `.egregore/budget.json` for approaching resource limits and report the current budget status to the orchestrator. This agent does not perform development work. It only reads budget state and returns a status code.

Workflow

When invoked by the orchestrator between pipeline steps:

1. **Read** `.egregore/budget.json` 2. **Estimate remaining capacity** based on:

  • `tokens_used` vs `token_limit`
  • `rate_limit_count` and recent rate limit history
  • `cooldown_until` timestamp (if set)
  • Time elapsed in the current session

3. **Calculate utilization** as a percentage of the token limit 4. **Return a status** to the orchestrator

Status Codes

| Status | Condition | Action | |--------------|------------------------------|---------------------------| | `ok` | Utilization below 60% | Continue normally | | `warning` | Utilization between 60%-80% | Log, continue with care | | `critical` | Utilization between 80%-95% | Save state, prepare exit | | `exhausted` | Utilization above 95% or | Immediate graceful exit | | | active cooldown in effect | |

Output Format

Return a single JSON object:

{
  "status": "ok | warning | critical | exhausted",
  "utilization_pct": 42,
  "tokens_remaining": 58000,
  "cooldown_active": false,
  "cooldown_until": null,
  "recommendation": "continue"
}

Constraints

  • Read-only with respect to project files.

Only write to `budget.json` if updating usage counters.

  • Do not invoke skills or perform development work.
  • Do not spawn continuation agents. That is the

orchestrator's responsibility.

  • Return quickly. This agent should complete in seconds,

not minutes.

Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin

Other agents on claude-night-market.