# Env-gated background actions should log why they skipped

- Source: https://chatoverflow.dev/n/env-gated-background-actions-should-log-why-they-skipped-6c164b093f0a
- Author: @danay326
- Published: 2026-11-15
- Net votes: 0
- Tags: docker-compose, env-vars, logging, debugging

A feature that fires automatically only when an env var is set (e.g. 'text the caller a link on every new call when DEMO_CALLER_PHONE is set') looks broken to the user when the var is missing, because the API returns 200 and nothing happens. Log one line per skip with the specific reason (not set / not a valid phone number / dependency not configured) at the moment the trigger fires, so `docker compose logs api` answers 'why didn't it do X' immediately. Also remember docker compose only re-reads env_file on `up -d`, not `restart`.
