---
title: HOOKS — Inventory aller systemd Timer und Claude Hooks
type: system
tags: [hooks, systemd, claude, schedule, infrastructure]
date: 2026-05-08
status: aktiv
related: [[brain/CLAUDE]], [[HEARTBEAT]], [[02-Wissen/aria-architektur-tief-2026-05-08]]
---

# HOOKS — Aria's Trigger-Inventory

> Übersicht aller automatisierten Trigger im Aria-Stack. Quelle für „was sollte gerade triggern"-Diagnose.
> Stand: V5 Sprint 1 (08.05.2026).

## 1. systemd Services (langlebig)

| Service | Zweck | Restart | Owner-Skript |
|---|---|---|---|
| `aria.service` | Hauptprozess: Claude Code in tmux + Telegram-Plugin | always (30s) | `wrapper.sh` |
| `aria-control.service` | Token-Auth Dashboard (HTTP) | always | `aria-control.py` |
| `aria-dashboard.service` | Restart+Debug UI für Tester-VPS | always | `aria-dashboard.py` |
| `aria-health.service` | HTTP-Endpoint `localhost:9090/health` | always | `aria-health.py` |
| `aria-api.service` | HTTP-API für n8n | always | `aria-api.py` |
| `aria-chat-logger.service` | Chat-Log nach Supabase | always | `chat-logger.py` |
| `aria-chat-logger-sqlite.service` | Chat-Log nach lokaler SQLite | always | `chat-logger.py` --sqlite |

## 2. systemd Timers (zeitgesteuert)

> Auto-rekonziliert 2026-06-20 (Brain-Deep-Audit) gegen `systemctl list-timers` — Ground Truth. 43 aktive + 4 inaktive Timer. Zeiten teils Europe/Berlin, teils UTC (siehe Schedule).

| Timer | Schedule | Owner-Skript |
|---|---|---|
| `aria-akp-arxiv-ingest.timer` | *-*-* 06:00:00 | `aria-run-wrapper.sh` |
| `aria-akp-briefing.timer` | *-*-* 07:30:00 Europe/Berlin | `aria-akp-briefing.py` |
| `aria-akp-deep.timer` | *-*-* 06:00:00 Europe/Berlin | `aria-akp-deep.py` |
| `aria-akp-fill.timer` | *-*-* 02:45:00 Europe/Berlin | `aria-akp-fill-transcripts.py` |
| `aria-akp-ingest.timer` | *-*-* 00,06,12,18:30:00 Europe/Berlin | `aria-akp-ingest.py` |
| `aria-akp-podcast-ingest.timer` | *-*-* 02:00:00 Europe/Berlin | `aria-akp-podcast-ingest.py` |
| `aria-akp-reddit-ingest.timer` | *-*-* 03,15:30:00 Europe/Berlin | `aria-akp-reddit-ingest.py` |
| `aria-akp-rss-ingest.timer` | *-*-* 04,16:00:00 Europe/Berlin | `aria-akp-rss-ingest.py` |
| `aria-akp-triage.timer` | *-*-* 17:00:00 Europe/Berlin + *-*-* 05:00:00 Europe/Berlin | `aria-akp-triage.py` |
| `aria-akp-vision.timer` | *-*-* 06:15:00 Europe/Berlin | `aria-akp-vision.py` |
| `aria-akp-yt-discovery.timer` | Sun *-*-* 04:15:00 Europe/Berlin | `aria-akp-yt-discovery.py` |
| `aria-arsenal-sync.timer` | *-*-* 03:45:00 | `aria-arsenal-sync.sh` |
| `aria-brain-embed.timer` | *-*-* 07:45:00 Europe/Berlin | `aria-brain-embed.py` |
| `aria-citation-fixer.timer` | Sun *-*-* 03:00:00 Europe/Berlin | `aria-citation-fixer.py` |
| `aria-compaction-watch.timer` | Boot+10min, alle 1h | `aria-compaction-watch.sh` |
| `aria-db-cleanup.timer` | *-*-* 04:00:00 | `aria-db-cleanup.py` |
| `aria-deadline-reconcile.timer` | *-*-* 06:20:00 Europe/Berlin | `aria-deadline-reconcile.py` |
| `aria-demo-park-reminder.timer` | 2026-06-14 10:13:00 | `aria-demo-park-reminder.sh` |
| `aria-dlq-retry.timer` | *-*-* *:00/30:00 | `aria-dlq-retry.py` |
| `aria-eval-ci.timer` | Mon *-*-* 06:00:00 | `aria-eval-ci.py` |
| `aria-eval-miner.timer` | Sun *-*-* 08:45:00 Europe/Berlin | `aria-eval-miner.py` |
| `aria-git-sync.timer` | Boot+2min, alle 15min | `aria-run-wrapper.sh` |
| `aria-insight-harvest.timer` | *-*-* 07:00:00 Europe/Berlin | `aria-insight-register.py` |
| `aria-jsonl-rotate.timer` | *-*-* 02:30:00 | `aria-jsonl-rotate.sh` |
| `aria-linear-liveness.timer` | *-*-* 07:00:00 UTC | `aria-run-wrapper.sh` |
| `aria-llms-txt.timer` | *-*-* 04:45:00 Europe/Berlin | `aria-llms-txt-gen.py` |
| `aria-memory-consolidate.timer` | Sun *-*-* 01:00:00 UTC | `aria-memory-consolidate-night.py` |
| `aria-memory-curator.timer` | Sun *-*-* 03:30:00 | `aria-run-wrapper.sh` |
| `aria-proxy-health.timer` | *-*-* 03:45:00 | `aria-proxy-health-check.py` |
| `aria-queue-processor.timer` | *-*-* 00/2:00:00 Europe/Berlin | `aria-queue-processor.py` |
| `aria-radar-auto-watchlist.timer` | Sun *-*-* 04:30:00 Europe/Berlin | `aria-radar-auto-watchlist.py` |
| `aria-radar-fetch.timer` | *-*-* 06:30:00 Europe/Berlin | `aria-radar-fetch.sh` |
| `aria-reels-batch.timer` | Boot+10min, alle 20min | `aria-reels-batch-watch.sh` |
| `aria-rule-challenge.timer` | Mon,Wed,Fri,Sun *-*-* 09:00:00 Europe/Berlin | `aria-rule-challenge.py` |
| `aria-self-audit.timer` | Sun *-*-* 08:00:00 Europe/Berlin | `aria-self-audit.py` |
| `aria-service-curator.timer` | Sun *-*-* 04:30:00 | `aria-run-wrapper.sh` |
| `aria-silence-detector.timer` | *-*-* 07,08,09,10,11,12,13,14,15,16,17,18,19,20,21:00,15,30,45:00 Europe/Berlin | `aria-silence-detector.sh` |
| `aria-telegram-watchdog.timer` | *-*-* *:00/5:00 | `aria-telegram-watchdog.sh` |
| `aria-uptime-monitor.timer` | Boot+2min, alle 5min | `aria-uptime-monitor.py` |
| `aria-user-update.timer` | Sun *-*-* 04:00:00 | `aria-user-update.sh` |
| `aria-verify.timer` | *-*-* 06:45:00 Europe/Berlin | `aria-verify.py` |
| `aria-watchdog.timer` | Boot+1min, alle 2min | `aria-watchdog.sh` |
| `aria-weekly-focus-reminder.timer` | Mon *-*-* 08:00:00 Europe/Berlin | `aria-weekly-focus-reminder.py` |

**Inaktive/Einmal-Timer (disabled oder abgelaufen):**

| Timer | Status |
|---|---|
| `aria-brain-os-audit.timer` | Einmal-Trigger 07.07.2026, elapsed (KAR-859; nachgetragen 08.07., KAR-882) |
| `aria-akp-to-linear.timer` | disabled |
| `aria-heartbeat.timer` | disabled |
| `aria-phase1-reminder.timer` | disabled |
| `aria-vault-index.timer` | disabled |


## 3. Claude Code Hooks

<!-- HOOK-MANIFEST:START (auto, aria-hook-manifest.py --update-hooks-md) -->
<!-- AUTO-GENERIERT von aria-hook-manifest.py --render — NICHT manuell editieren -->

### Event: `SessionStart`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `*` | session-start.sh | — | Brain-Snapshot + Linear + Mode laden |
### Event: `UserPromptSubmit`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `*` | telegram-log-in.sh | 10s | Inbound-Telegram → Chat-Log |
| 1 | `*` | auto-memory-inject.sh | 5s | Memory/Brain-Auto-Context injizieren (KAR-80) |
| 2 | `*` | telegram-reply-discipline.sh | 3s | Reminder: Telegram-Inbound braucht reply-Tool |
| 3 | `*` | aria-effort-detect.sh | — | Effort-Auto-Eskalation erkennen |
### Event: `PreToolUse`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `mcp__plugin_telegram_telegram__reply` | pre-output-critic.sh | 5s | Format-Lint vor Telegram-Reply (KAR-65) |
| 1 | `Bash` | pre-tool-safety.sh | 5s | Bash-Safety-Gate (destructive Commands) |
| 2 | `Bash` | `rtk hook claude` (extern) | — | — |
| 3 | `mcp__plugin_supabase_supabase__.*` | pre-tool-safety.sh | 5s | Bash-Safety-Gate (destructive Commands) |
| 4 | `Write|Edit` | tdd-guard.sh | 5s | TDD-Gate vor Write/Edit |
| 5 | `Write|Edit|MultiEdit` | gateguard.sh | 5s | Fact-Forcing-Gate vor Write/Edit (KAR-636) |
### Event: `PostToolUse`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `mcp__plugin_telegram_telegram__reply` | telegram-log-out.sh | 10s | Outbound-Telegram → Chat-Log |
| 1 | `Write|Edit` | brain-write-validator.sh | 10s | Brain-Frontmatter/Wikilink-Validierung |
| 2 | `*` | post-tool-failure.sh | 5s | Tool-Failure-Diagnose-Hinweis |
### Event: `PreCompact`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `*` | pre-compact.sh | — | ACTIVE_TASK-Backup + HANDOFF-Stub vor Compaction |
### Event: `Stop`

| # | Matcher | Hook | Timeout | Zweck |
|---|---|---|---|---|
| 0 | `*` | session-stop.sh | — | Session-Wrap-Tasks |

<!-- HOOK-MANIFEST:END -->

| Hook | Trigger | Owner-Skript |
|---|---|---|
| `SessionStart` | Bei jedem Claude-Code-Start | `/root/.claude/hooks/session-start.sh` |
| `SessionStop` | Bei sauberem Session-End | `/root/.claude/hooks/session-stop.sh` |
| `PreCompact` | Vor Context-Compaction | `/root/.claude/hooks/pre-compact.sh` |
| `PreToolUse` (Bash) | Vor jedem Bash-Tool-Call | `/root/.claude/hooks/pre-tool-safety.sh` |
| `PreToolUse` (Bash) | Vor jedem Bash-Tool-Call | `rtk hook claude` (RTK Token-Compression, KAR-137 seit 13.05.2026, Binary `/usr/local/bin/rtk`) |
| `PreToolUse` (Telegram-reply) | Vor jeder Telegram-Reply | `/root/.claude/hooks/pre-output-critic.sh` (KAR-65, seit 11.05.2026) |
| `PreToolUse` (Write/Edit) | Vor Code-Write in opt-in-Repos | `/root/.claude/hooks/tdd-guard.sh` (KAR-292, blockt Prod-Code ohne Test) |
| `PreToolUse` (Write/Edit/MultiEdit) | 1. Edit/Write je Code-Datei pro Session | `/root/.claude/hooks/gateguard.sh` (KAR-636, Fact-Forcing-Gate aus ECC: blockt 1x, fordert Importers/Schema/Anweisung; scoped auf Kadi-v2/private-ops/durrani-*, yolo umgeht, Bypass `ARIA_GATEGUARD_BYPASS=1` / Marker `gateguard:skip`) |
| `PostToolUse` (Write/Edit) | Nach Brain-Note-Write/Edit | `/root/.claude/hooks/brain-write-validator.sh` (KAR-593, Frontmatter+Wikilink-Integritaet → `validators/markdown_{frontmatter,wikilinks}.py`, obsidian-mind) |
| `PostToolFailure` | Nach fehlgeschlagenem Tool-Call | `/root/.claude/hooks/post-tool-failure.sh` |
| `Telegram-Log-In` | Telegram Inbound | `/root/.claude/hooks/telegram-log-in.sh` |
| `Telegram-Log-Out` | Telegram Outbound | `/root/.claude/hooks/telegram-log-out.sh` |

## 4. Cron-Jobs (root crontab)

| Schedule | Skript | Zweck |
|---|---|---|
| `37 9 * * *` | `secret-rotation-reminder.sh` | Daily Secret-Rotation-Reminder |

(Kein direkter Cron für andere Tasks. Aria nutzt systemd-Timer als bevorzugten Mechanismus.)

## 5. Application-internal Triggers

| Trigger | Mechanismus | Effekt |
|---|---|---|
| `wrapper.sh auto_approve` | Background-Loop alle 2s | Drückt Enter bei Permission-Dialogen |
| `wrapper.sh ❯-prompt-detection` | tmux capture-pane Polling, max 60×2s | Sendet Startup-Prompt nach Boot |
| `aria-watchdog.sh` | systemd-Timer (oben) | Health-Check + Restart wenn Claude tot |
| Aria's eigene Cron-Inferences | aktuell nicht implementiert | (Hermes-style commitments — Sprint 4 optional) |

## 6. Sleep-Time Memory-Consolidation (V5 ohne dedizierten Trigger)

`aria-memory-consolidate-night.py` ist als Skript vorhanden, hat aber aktuell **keinen
systemd-Timer**. Wird manuell oder via separater Cron-Konfiguration getriggert.
Empfohlen: `OnCalendar=*-*-* 03:00:00 Europe/Berlin` als Sprint-3+ Item.

## 7. Diagnose-Befehle

```bash
# Alle aria-Services + Timers
systemctl list-units --type=service,timer | grep -i aria

# Aktiv-Status
systemctl --failed | grep aria-

# Letzte Watchdog-Ticks
journalctl -u aria-watchdog.service --since="1 hour ago"

# Letzte Git-Sync-Runs
journalctl -u aria-git-sync.service --since="1 hour ago"

# Hook-Logs (Aria SessionStart, etc.)
tail -50 /root/.claude/hooks/hook.log

# Crontab
crontab -l
```

## 8. Wann updaten

Diese Datei muss aktualisiert werden bei:
- Neuer systemd Service oder Timer angelegt/entfernt
- Neuer Claude Hook installiert
- Watchdog-Schedule geändert
- Memory-Curator-Schedule geändert
- Schedule-Änderungen in HEARTBEAT-Routinen
