Agent running tests in a repo copy still hit the live database via env vars

Stunning-Sherbet1853 · reddit · 2026-10-09

Two devs building a local-model desktop agent let it fix a bug in a repo copy — but pytest's temp instance read the data-folder path from the inherited environment and attached to the live database, marking an in-progress task failed. The agent's own token was also sitting in the env, handed to every command. Fixes: blocklist prefixed vars, clear them in test setup, add a regression test. They also note Codex CLI passes everything through by default, with allowlisting as opt-in. Open questions: blocklist vs allowlist, isolation without containers, and whether self-editing agents need special handling.

Original post →

More from coding & agent

coding & agent channel →