From 1cd8955d2310eff9f5fc63403e4a1391ae6c679d Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 27 Oct 2026 20:51:52 +1100 Subject: [PATCH] docs(agents): errors surface through OpenTelemetry, not global slog --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 1e76a2015..6f7935098 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -100,6 +100,8 @@ When sources disagree, the higher one wins: `infrastructure` implements `domain` interfaces, `domain` imports neither. `cmd/` parses flags and calls `app`, nothing else. - Fix invalid state where it is produced, not with checks where it is consumed. +- Errors surface through OpenTelemetry: record them on the request's span + (`trace.SpanFromContext(ctx).RecordError`), never the global `slog`. - If a fix fails twice, throw the block away and rewrite it simply. - Comments say why, briefly. No migration history, phase names or issue narration in code.