CLAUDE LABJP
BUDGET — You can now cap what a Claude Managed Agents session spends. When it hits the cap, the session stops issuing new model requests and returns a budget_reached stop reasonRESUME — Change or clear the budget and the session picks up again. Deployments take the same setting, but it applies per session they start, not to the deployment as a wholeGEO — A new inference_geo field controls where inference runs. Set it inside the model object when creating an agent, or override it for a single session. It takes us or globalSKILLS — When a Managed Agents session mounts a GitHub repository, any skills sitting in its root .claude/skills directory are discovered automatically at session startTRADEOFF — Convenience and context cost sit on the same scale. Every extra skill you load also shows up in what /skill-doctor charges you each turnCLI — Claude Code has not shipped a confirmed release since v2.1.263 on September 6. Version numbers skip, so check the official changelog against CHANGELOG.md before quoting oneBUDGET — You can now cap what a Claude Managed Agents session spends. When it hits the cap, the session stops issuing new model requests and returns a budget_reached stop reasonRESUME — Change or clear the budget and the session picks up again. Deployments take the same setting, but it applies per session they start, not to the deployment as a wholeGEO — A new inference_geo field controls where inference runs. Set it inside the model object when creating an agent, or override it for a single session. It takes us or globalSKILLS — When a Managed Agents session mounts a GitHub repository, any skills sitting in its root .claude/skills directory are discovered automatically at session startTRADEOFF — Convenience and context cost sit on the same scale. Every extra skill you load also shows up in what /skill-doctor charges you each turnCLI — Claude Code has not shipped a confirmed release since v2.1.263 on September 6. Version numbers skip, so check the official changelog against CHANGELOG.md before quoting one
Articles/Claude Code
Claude Code/2026-07-25Advanced

Locking down Claude Code sandbox egress with strictAllowlist

Tightening automation egress with strictAllowlist in Claude Code v2.1.219, plus measured failure timings that tell a policy deny from DNS and real outages, and three defects that made my own recon scripts return nothing.

Claude Code249SandboxSecurity12Automation44Networking

Premium Article

Late one night, my automated publishing pipeline stopped partway through without saying why.

The logs showed something that looked like a connection timeout. I blamed the network, re-ran it, and sometimes it went through. Classic "flaky network" behavior. Except the network was fine. A single host I had forgotten to add to the allowlist was being quietly refused.

This happened right after I turned on sandbox.network.strictAllowlist, added in Claude Code v2.1.219 (2026-07-24). As an indie developer running this pipeline solo, I want to share the field notes from folding that setting into my automation. I will spend less time on how to enable it and more on what broke afterward and how I tracked it down.

The later half of this article covers something I only found after publishing the first version: the observation scripts I wrote to watch the lockdown were themselves broken. I ran them again with the kind of input they were built for, and they returned nothing at all.

A "deny" wears the mask of an outage

The idea behind strictAllowlist is simple. For commands run inside the sandbox, refuse any outbound connection to a host that is not on the allowlist. It is a sensible way to run automation with a safe default.

But running it taught me that the deny itself is less troublesome than how the deny appears.

A connection to a host missing from the allowlist looks, from the application's point of view, like an ordinary connection failure. Most tools interpret that as "the network is unhealthy" and surface a retry or timeout message. In other words, an intentional policy block shows up wearing the face of a random network outage. That was the first pitfall. To work around this trap, observe the facts before you guess at the cause.

So the first thing I did was not to write an allowlist. It was to observe, once and completely, which hosts the pipeline actually reaches out to.

Discover the hosts you really touch

The "it probably connects to this host" in your head is not reliable. Trace connect(2) and collect destinations as facts. The script below wraps any command and prints the hostnames it connects to.

#!/usr/bin/env bash
# egress-recon.sh — discover which hosts a command actually connects to
# usage: ./egress-recon.sh <command to run...>
#   e.g. ./egress-recon.sh bash deploy-pipeline.sh
# NOTE: this version has three defects described later. The corrected script is
#       in "The observation harness was the first thing that broke"
set -euo pipefail
 
TRACE="$(mktemp)"
trap 'rm -f "$TRACE"' EXIT
 
# follow only connect(2), recording destination addresses
# -f: follow child processes (git and npm spawn many)
strace -f -qq -e trace=connect -o "$TRACE" "$@" || true
 
# extract IPv4 destinations: sin_addr=inet_addr("x.x.x.x")
grep -oE 'inet_addr\("[0-9.]+"\)' "$TRACE" \
  | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' \
  | sort -u > "$TRACE.ip"
 
echo "# destination hosts (reverse-resolved, deduped)"
while read -r ip; do
  # skip local / link-local
  case "$ip" in 127.*|0.0.0.0|169.254.*) continue;; esac
  host="$(getent hosts "$ip" | awk '{print $2}')"
  printf '%-24s %s\n' "${host:-"(no PTR)"}" "$ip"
done < "$TRACE.ip" | sort -u

The key flag is -f. Both git push and npm install hand the real work to child processes. Watch only the parent and you miss the connections that matter.

Running this once in my environment, the destinations came to eleven hosts. I had expected four. Roughly 2.7x what I anticipated.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A runnable script that traces connect(2) to reveal every host your pipeline actually contacts
Measured failure timings (0.02ms, 1.22ms, exactly 3s) that separate a policy block from DNS and from a real outage
Three defects that made the recon script return an empty list on exactly the addresses it was written for, with the corrected scripts and their real output
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

Claude Code2026-07-17
The String I Approved Wasn't the String I Read — Testing a Relayed Permission Prompt with Deceptive Characters
I pushed bidi overrides and zero-width characters through my own approval relay. NFKC normalization caught 0%. Here is why, and the implementation that catches 100% with zero false positives.
Claude Code2026-07-05
Rolling Out Trusted Devices for a Small Team: Enrollment, Preflight, and Rotation
How to introduce Team/Enterprise Trusted Devices for a 2-5 person team: device enrollment, an unattended-run preflight gate, and closing the gaps that appear during device rotation and offboarding.
Claude Code2026-06-29
Borrowing the Trusted Devices Idea for a Solo Setup: Pinning Automated Runs to Devices You Approved
The Trusted Devices feature that landed in Claude Code on June 28, 2026 is for Team and Enterprise. You can't use the feature on a solo plan, but you can borrow the idea. Here is how to identify a device in a way that doesn't break, and stop any automated run that starts from a device you never approved — with working code and the traps to avoid.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links