Skip to content
BENIBIX Learn

OTEL_LOG_USER_PROMPTS

AI⌨️ Claude CodeConfiguration

Also known as OTEL_LOG_ASSISTANT_RESPONSES

Set to 1, it puts your prompt text into telemetry logs.

Think of it like

It is like a call log that keeps what was said. Not just the time.

Example

Emma's team must keep a record of what people asked the AI. She turns this on, and each prompt lands in the team's log store.

Why it matters

Prompts can hold private data. Hiding them by default keeps that data out of logs.

Definition

OTEL_LOG_USER_PROMPTS set to 1 puts the text of your prompts in the logs. By default the prompts are hidden. A twin, for the model's answers, does the same for what it says back. If the twin is not set, it follows this one. Project settings skip both.

Example code

bash
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOG_USER_PROMPTS=1
claude
Log prompts for a team audit.

Common mistake

Turning it on without checking who can read the logs. Prompts may hold secrets.

Key takeaways

  1. 1
    Prompt text in logs. When set.
  2. 2
    Hidden by default. Redacted.
  3. 3
    Answers have a twin. ASSISTANT_RESPONSES.