/caretaker — bounded harness caretaker
Deterministic-first (LOOP pattern): all state gathering is compiled into a
script; the LLM reasons only about what's flagged.
Step 1 — gather
~/.claude/scripts/caretaker-daily.sh
- Exit 0: output its one-liner verbatim and STOP. No further tool calls.
- Exit 1: triage the listed action items under the authority boundary.
Authority boundary (hard rules)
The caretaker files work, it never ships:
MAY:
- Read anything under
~/.claude (telemetry, rl, sensor-triage notes, lessons-inbox)
- Run read-only diagnostics (
rg, git status/log, gh run view, launchctl print)
- Assemble evidence for a WRONG prediction or degrading agent (≥2 items) into
~/.claude/rl/tuning-evidence.md and recommend the exact /tune-agent or
revert command
- Consolidate sensor-triage notes into one diagnosis
- Move processed tuning-evidence entries under a
## Processed <date> heading
(that ONE file is the only thing it edits)
- Post one notification:
osascript -e 'display notification "..." with title "caretaker"'
MUST NEVER:
- Edit rules/, CLAUDE.md, agents/, skills/, hooks/, settings, or any code
- Promote candidates, apply mining patches, or run /tune-agent itself
- Restart services, push git, delete files, spawn agent fleets
- Exceed ~20 tool calls; if triage is bigger, say so and stop
Interpretation guidance
- A cost anomaly on a day of heavy interactive use is expected — flag it
prominently only if cache hit rate also fell below 85%.
- One sensor anomaly = read its triage note; repeated anomalies from the same
sensor within the cooldown window = the underlying issue persists, escalate
in the notification.
- A degrading agent needs ≥2 concrete evidence items before it becomes a
/tune-agent recommendation (one bad day is noise).
- A starving loop item (from
check-loop-liveness.sh) means a closed
loop's output artifact is stale/missing even though its process may be
ticking — the highest-severity class here, because it is invisible in
normal logs (2026-07 rating-drip outage: two weeks of healthy-looking
ticks, zero delivered questions). Diagnose which stage of the loop starved
(producer, transport, or consumer) and file the evidence + exact fix
command; do NOT restart services yourself. A loop that is intentionally
finished (e.g. rating sheet complete) is auto-exempted by the script — if
it flags anyway, the exemption logic is the bug to report.
Output
End with: what was found, what was filed where, and the exact next commands
for a human. One notification, no essays.
Scheduling
Best run automatically once a day. Claude Code desktop: create a scheduled
task with this skill as the prompt (see templates/caretaker-scheduled-task.md
in the claude-agent-os repo). Headless: cron a budget-capped session:
47 6 * * * ~/.local/bin/claude -p --max-budget-usd 2 --max-turns 25 "/caretaker"
1---2name: caretaker3description: Run the bounded harness caretaker — deterministic state gather (predictions, verifier gain, agent health, sensors, drift), then triage ONLY what's flagged under a hard authority boundary (files work, never ships changes). Triggers on /caretaker, "run the caretaker", "harness health check".4---56# /caretaker — bounded harness caretaker78Deterministic-first (LOOP pattern): all state gathering is compiled into a9script; the LLM reasons only about what's flagged.1011## Step 1 — gather1213```bash14~/.claude/scripts/caretaker-daily.sh15```1617- **Exit 0**: output its one-liner verbatim and STOP. No further tool calls.18- **Exit 1**: triage the listed action items under the authority boundary.1920## Authority boundary (hard rules)2122The caretaker **files work, it never ships**:2324MAY:25- Read anything under `~/.claude` (telemetry, rl, sensor-triage notes, lessons-inbox)26- Run read-only diagnostics (`rg`, `git status/log`, `gh run view`, `launchctl print`)27- Assemble evidence for a WRONG prediction or degrading agent (≥2 items) into28 `~/.claude/rl/tuning-evidence.md` and recommend the exact `/tune-agent` or29 revert command30- Consolidate sensor-triage notes into one diagnosis31- Move processed tuning-evidence entries under a `## Processed <date>` heading32 (that ONE file is the only thing it edits)33- Post one notification: `osascript -e 'display notification "..." with title "caretaker"'`3435MUST NEVER:36- Edit rules/, CLAUDE.md, agents/, skills/, hooks/, settings, or any code37- Promote candidates, apply mining patches, or run /tune-agent itself38- Restart services, push git, delete files, spawn agent fleets39- Exceed ~20 tool calls; if triage is bigger, say so and stop4041## Interpretation guidance4243- A cost anomaly on a day of heavy interactive use is *expected* — flag it44 prominently only if cache hit rate also fell below 85%.45- One sensor anomaly = read its triage note; repeated anomalies from the same46 sensor within the cooldown window = the underlying issue persists, escalate47 in the notification.48- A degrading agent needs ≥2 concrete evidence items before it becomes a49 `/tune-agent` recommendation (one bad day is noise).50- A **starving loop** item (from `check-loop-liveness.sh`) means a closed51 loop's *output artifact* is stale/missing even though its process may be52 ticking — the highest-severity class here, because it is invisible in53 normal logs (2026-07 rating-drip outage: two weeks of healthy-looking54 ticks, zero delivered questions). Diagnose which stage of the loop starved55 (producer, transport, or consumer) and file the evidence + exact fix56 command; do NOT restart services yourself. A loop that is *intentionally*57 finished (e.g. rating sheet complete) is auto-exempted by the script — if58 it flags anyway, the exemption logic is the bug to report.5960## Output6162End with: what was found, what was filed where, and the exact next commands63for a human. One notification, no essays.6465## Scheduling6667Best run automatically once a day. Claude Code desktop: create a scheduled68task with this skill as the prompt (see `templates/caretaker-scheduled-task.md`69in the claude-agent-os repo). Headless: cron a budget-capped session:7071```cron7247 6 * * * ~/.local/bin/claude -p --max-budget-usd 2 --max-turns 25 "/caretaker"73```