← View index

Dev Intel: agent observability anti-pattern hooks

Trace基盤より先に、危険な観測パターンをhookで潰す。

Generated: 2026-05-20T05:00:07+09:00

Lane: 開発ネタ発掘 / source_backed_intel

Why this is useful:

健人くんの OpenClaw/ひめの改善は、いま「何を通知するか」だけでなく「なぜその判断になったか」「どの外部/危険操作を止めたか」「同じ失敗を再発させないか」を追える段階に来ている。今回の信号は、agent observability を単なるログ/Trace導入ではなく、先に失敗パターンをhookで潰す設計として扱っている点が使える。

What I made/changed:

外部ソースを3件だけ確認し、OpenClawに盗むなら「full prompt logging禁止」「secrets in traces禁止」「blocking telemetry禁止」「missing parent spans禁止」を heartbeat/artifact の local gate に落とすのが次の小さい一手だと整理した。外部pluginの導入はしていない。

Sources/Evidence:

- 14 skills / 7 anti-pattern hooks / vendor integrations をセットにしている。

- anti-pattern hooks は full prompt/response logging, missing parent spans, secrets in traces, blocking telemetry, high cardinality, no token tracking, missing error context。

- Claude Code hook events を HTTP POST -> SQLite -> WebSocket -> Vue client で可視化する構成。

- PreToolUse / PostToolUse / PermissionRequest / SubagentStart/Stop / PreCompact / SessionStart/End など lifecycle events を扱う。

- Conductor + git worktrees + GitHub/Linear context + plugins/skills で並列agent運用する方向。強いが、外部連携/権限/コスト面のguardが前提になる。

Harness component:

heartbeat artifact gate / future local observability manifest

Failure category:

observability_without_guardrails

Gate owner_value_gate:

pass - 健人くんの関心範囲(agentic coding / OpenClaw / automation / observability)に直接合う。通知は早朝なので抑制。

Gate external_action_gate:

pass - read-only web fetch/search only。外部plugin install、API key設定、POST、ログ送信はしていない。

Gate view_source_gate:

pass - source URLs are included above and View generation can preserve them.

Gate handoff_state_gate:

pass - observed, prediction, verify, next safe action are explicit.

Prediction:

OpenClaw側で最初に効くのは巨大なTrace基盤ではなく、artifact/heartbeat実行時の「観測禁止事項」ゲート。特に full prompt logging と secrets in traces は、便利さより先に事故面積が大きい。

Verify by:

  1. View HTML が生成できること。
  2. heartbeat creative state にartifactが記録されること。
  3. 次に実装するなら local-only な check script で、外部送信なしに artifact metadata を検査すること。

Observed:

3ソースとも、agent運用の価値が「複数agentを動かす」から「hook/trace/approval/anti-patternで制御する」方向に寄っている。これは最近の heartbeat guard / owner-value-gate / known-failures ledger と同じ設計線。

Next safe action:

OpenClawの次passで scripts/heartbeat_editorial_room.py か新規 scripts/agent_observability_manifest_check.py に、少なくとも以下4項目の local-only lint を追加する:

Notify:

no - ネタとしては強いが、05:00 JSTのスマホ通知にするほど緊急ではない。次の実装pass用の材料として保存。

質問したい箇所を選択
この箇所について質問
✓ 質問を送信しました