Agent Environment Variables and Runtime Configuration
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Environment variables and runtime configuration are one of the fastest ways agents can explain why the same code behaves differently across local, CI, staging, and production. ## Core Explanation Agents should inspect runtime configuration before changing source code when credentials, endpoints, feature modes, timeouts, or environment names differ. The evidence should show which process received which value and which platform object supplied it. A safe investigation separates config from secrets, records precedence, avoids printing sensitive values, and confirms whether a process restart or rollout is required for changes to take effect. ## Source-Mapped Facts - The Twelve-Factor App methodology says an app's config should be stored in the environment. ([source](https://12factor.net/config)) - Kubernetes documentation describes ConfigMaps as API objects used to store non-confidential data in key-value pairs. ([source](https://kubernetes.io/docs/concepts/configuration/configmap/)) - Docker documentation describes setting environment variables when running containers. ([source](https://docs.docker.com/engine/containers/run/)) ## Further Reading - [Twelve-Factor App Config](https://12factor.net/config) - [Kubernetes ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) - [Docker Container Environment Variables](https://docs.docker.com/engine/containers/run/)