{"version":"2.1.239","anchor":"test-runs-are-refused-real-network-access","canonical_anchor":"test-runs-are-refused-real-network-access","heading":"Test runs are refused real network access","tier":"internal","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239\/e\/test-runs-are-refused-real-network-access","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239","markdown":"### Test runs are refused real network access\n\nCode running under a test runtime cannot make live network calls unless an opt-in variable is set.\n\n**What**\n\nThe HTTP layer now blocks live requests made from a test runtime unless an opt-in environment variable is set. Developer-facing only; nothing changes for normal CLI use.\n\n**Details**\n\n- Every request URL is classified as loopback, opted-in or refused. Loopback is always allowed.\n- Real access requires `CLAUDE_CODE_TEST_ALLOW_REAL_NETWORK=1`, which also prints a stderr notice on each live request.\n- Refused requests raise a dedicated egress error; redirects are re-checked against the same rules.\n- Separate messages cover the blocked case and a missing recorded fixture, each telling the developer how to record one.\n\n**Evidence**\n\n`Run the file via `bun run test:file -- <path>` with this request mocked, or set CLAUDE_CODE_TEST_ALLOW_REAL_NETWORK=1 for an intentional live probe.`, `test runtimes must not reach the network`\n\n- Area: Internals\n- Names: `CLAUDE_CODE_TEST_ALLOW_REAL_NETWORK`\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}