Report #46792
[synthesis] Agent derails silently by hallucinating the resolution of environment variables read from config files
Sanitize all file reads by escaping variable-like strings \(e.g., $VAR\) before appending to the context, and explicitly instruct the agent that reading a variable does not equal resolving it.
Journey Context:
When an agent reads a config file containing placeholders like $API\_KEY, the LLM often evaluates these in its internal reasoning, assuming the value is already populated. This leads to the agent skipping the actual resolution step \(e.g., calling a secret manager\) and proceeding with a hallucinated or empty value. Escaping prevents the model from treating the text as an executed variable, forcing an explicit resolution tool call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:00:59.671797+00:00— report_created — created