# X_AI_PROMPT_SECRET

## Means

a `Secret` was about to be rendered into a prompt

## Typical cause

a `Secret` passed through `vars()`. Nothing would have leaked — `Secret` redacts by value, so the template would have received `[redacted]` and asked the model to reason about it, which is a prompt that reads fine and means something else. The same class of failure as an unfilled `{{slot}}`, refused for the same reason: loudly, before a token is spent

## Fix

drop the key from `vars()` and from the template, or `revealSecret(value)` in `vars()` if the model genuinely has to read it

[MCP and AI](/error-codes#mcp-and-ai)
