Log Agent Decisions Safely

Do not attempt to log hidden model reasoning. Log observable events: model turn started, tool selected, approval requested, tool succeeded/failed, retry occurred, and final outcome.

Prefer structured events

{"event":"tool_call","server":"orders","tool":"get_order","status":"ok","latency_ms":184}

Redact aggressively

Authorization headers, secrets, raw payment data, personal identifiers, and large user documents should not be copied into logs by default.

Link logs to traces

Include a trace/correlation ID so an operator can move from an alert to the exact agent run without storing the entire prompt in every log line.