Chapter 04The platform·~15 min read

Sandboxes and environments: one image, disposable VMs and multi-service slices

Where agent sessions run, how they start quickly, what they can reach, and how several services are tested together without real vendors or customer data.

Platform team Engineering Security & compliance

Key takeaways

  1. One signed image serves every surface. Laptops, CI and hosted runs share it; it is rebuilt nightly with a warm checkout and caches.1
  2. Each hosted run gets its own disposable EC2 VM from a warm pool, with no CI runner on the agent path: at most 4 hours per run, start target p95 ≤2 minutes.1
  3. Nothing depends on a personal machine. The laptop lane is optional and opens to all engineers only after gate W-gov part 1 (week 4).1
  4. A sandbox reaches four destinations and nothing else, through an exact-host proxy; the design assumes the agent can read all VM memory.12
  5. Several services are tested together from month 4, in 15-minute slices inside the run's VM against squad-owned twins; per-PR environments wait until about 15 services.13
  6. Compute is under 3% of cost, so the simplest full VM wins; other substrates wait behind a port.4
  7. Mobile needs special hardware. Android emulators run on C8i in Stockholm from month 4; iOS needs Macs in Frankfurt or Ireland; signing keys never enter a sandbox.56
04.1

The requirement and the answer

Our answer: two lanes, one image, and isolation instead of approval prompts. Every hosted agent run gets its own short-lived Amazon EC2 virtual machine (VM) in a dedicated AWS account in Stockholm (eu-north-1); a laptop lane is optional. Inside the VM the agent may do anything, because the VM holds no production access, no customer data and no open internet.1

This meets requirement R1 (requirements table): sandboxed sessions, hosted or local, repeatable builds and verification, many in parallel, and nothing that depends on a personal machine.1 Leading in-house agent teams converged on the same pattern: Stripe's devboxes have no arbitrary egress, and Ramp's sandboxes start in under 5 seconds with Postgres, Redis, Temporal and Chromium included (both self-reported).78

Wall-clock cap per hosted run≤4hThen the VM is terminated1
Start-time target≤2min p95Measured on pilot runs; must hold to pass W-tech1
Concurrent hosted runs per engineer3 → 8 → 15At gates W-tech, L and F11
Sandbox compute, share of total cost<3%Planning estimate, all three scenarios4
Insight

Headless agents need a box, not a prompt. Since version 2.1.302, headless Claude Code (claude -p) and the Agent SDK deny any tool call that needs approval unless an allow rule, a hook, a callback or auto mode approves it.9 An unattended agent either works inside a boundary where nearly everything is allowed, or it stalls.

When. The hosted lane arrives in weeks 5-8 of the 12-week walking skeleton ("launch"; "go-live" is the bank's own production launch). A pilot of 8-10 engineers starts in week 8 (W-gov part 2); every engineer gets three concurrent runs at W-tech in weeks 12-13 (roadmap; gates in the glossary).1

04.2

One image, two lanes

One signed image is the only definition of the agent's environment, so "it works in the sandbox" means "it works in CI". Built from the monorepo, it is signed, pushed by digest to Amazon Elastic Container Registry (ECR) and baked into an Amazon Machine Image (AMI) for the hosted VMs. It holds a pinned Claude Code, the bank's Agent SDK runner, pinned toolchains with an OpenTelemetry (OTel) collector, bank-owned skills and managed settings, and proxy settings for every toolchain.1

Deep dive: what the image holds, item by item 1 min
  • Claude Code, pinned, with a managed minimum of 2.1.179, the release that fixed Plugin4Shell, a zero-click remote-code-execution flaw in plugin auto-update.10 Weekly patch bumps (2.1.331, of 23 November 2026, is current11) are a pre-approved standard change (chapter 11).
  • The Agent SDK runner, about 1,000 bank-owned lines that unpack the task bundle, drop privileges and stream the session out of the VM.1
  • Toolchains pinned with mise and its lockfile, Playwright with its browsers, dockerd for containers, and an OTel collector configuration.
  • Bank-owned skills and managed settings that no repository change can override.
  • Proxy settings for every toolchain, because tools that ignore proxy variables fail in confusing ways against an allowlist (section 04.4).

The image is rebuilt nightly with a warm checkout, build caches and the container images that L2 slices pull, so a fresh VM does not start by downloading; Ramp rebuilds every 30 minutes for the same reason (self-reported).8 Spike S14 (weeks 1-3) settles whether the agent's containers can run with rootless Docker and Compose.1

Only the hosted lane is required. It carries all background work, with the whole VM as the boundary. The laptop lane, the "local atelier", is an optional convenience for interactive work, with the same image and stricter settings than Claude Code's defaults.1

The two lanes side by side: isolation, model access, egress, telemetry and timing 8 rows
The two lanes compared: the optional local atelier on laptops and hosted runs on EC2 VMs
Laptop laneHosted lane
Used forInteractive work the engineer steersBackground runs started from Slack; all agent work that no human watches
IsolationClaude Code's native sandbox for shell commands, enforced by managed settingsThe whole VM; the agent runs as an unprivileged user
Model accessA Bedrock-only AWS permission set for the humanNo model credential in the VM; a run token for the bank's gateway
EgressManaged domain list only; WebFetch allowlistExact-host proxy; no NAT
Requester of recordThe laptop authorThe person who asked in Slack
TelemetryOTel only after the data protection impact assessment (DPIA) and drøftingSDK stream to S3; the gateway's witness chain
OpensPlatform team first; all engineers after W-gov part 1 (week 4)Pilot of 8-10 engineers at week 8; everyone at W-tech (weeks 12-13)
Required?OptionalYes the only lane for background work
Take-away: the hosted lane never depends on a personal machine; the laptop lane is a convenience with the same image and stricter settings than the defaults. Source: internal recommendation, §2.1 and §7.1.1

Lane 1: the local atelier

Laptops run Claude Code in its native sandbox, with policy delivered by mobile device management (MDM), not by the repository, where anyone with write access could change it.12 The native sandbox covers shell commands only and by default can read most of the machine, including ~/.ssh and ~/.aws/credentials,13 so the bank's baseline closes those gaps.

Deep dive: the laptop baseline, rule by rule 1 min

Hooks, MCP servers and file tools run outside the native sandbox.13 The managed settings therefore add:

  • deny rules for ~/.aws, ~/.ssh, ~/.config/gh, ~/.docker, ~/.kube and secret environment variables;
  • managed domains only, with no generic writable hosts, plus a WebFetch allowlist;
  • no sandbox exceptions for docker or ./x, since an exception would let the agent write a Compose file and run it outside the sandbox;13
  • a Bedrock-only permission set for model access; and
  • a guard in ./x that refuses to run on an agent/* checkout outside a sandbox.1

Until the data protection impact assessment (DPIA) and the drøfting are done (both W-gov part 1 criteria, week 4), only the platform team uses this lane, without OTel telemetry.1 From month 4, ./x agent attach opens an interactive session on a hosted VM, so steering a run needs no laptop either.

Norwegian term

Drøfting: the consultation with employee representatives that the Working Environment Act (arbeidsmiljøloven § 9-2) requires before an employer introduces control measures, such as telemetry on how staff use agents. See the glossary and chapter 10.

Risk

No Docker Desktop, and no Docker AI features without legal sign-off. Docker's subscription agreement of 26 August 2026 counts "a human or AI Agent" as a user of its AI features, makes the customer defend Docker against claims from an AI agent's actions in a Docker Sandbox, and makes Desktop free only below 250 employees and USD 10 million revenue.14 The image uses the open-source engine, dockerd.

04.3

Life of a hosted run

A hosted run is a VM that lives for one task. It boots with nothing worth stealing, receives a run-scoped kit exactly once, hands back a git bundle and is destroyed. Figure 1 shows the eight steps.

Figure 1. Life of a hosted run
Eight steps from claim to termination: one VM, one run, one task
Life of a hosted run Sequence diagram with five lifelines: the SessionLauncher and the identity broker in the control account; the VM's root bootstrap and the unprivileged agent user in the agent account; and the model gateway with the git broker. The launcher claims a warm VM; the VM presents its identity document; the broker returns the task bundle and tokens once; root starts Claude Code as the agent user; the agent calls models through the gateway, runs checks locally and returns work as a git bundle; the launcher terminates the VM. The only egress is to the gateway, the identity and git brokers, package and image mirrors and the GitHub tenant. CONTROL ACCOUNT AGENT ACCOUNT OUTSIDE VM Launcher Lambda Identity broker no LLM VM · root bootstrap VM · agent Claude Code Model gateway + git broker 1 Launcher claims a warm VM Auto Scaling warm pool, or RunInstances run ID in tags 2 VM presents its identity document AWS-signed; accepted once per run identity doc 3 Broker verifies, hands over the kit task bundle, run token, read-only token bundle + tokens 4 Root drops to the agent user Claude Code starts; IMDS blocked for agent uid agent 5 Model calls go through the gateway run token; budgets, kill switch, witness run token 6 Plan, code and check inside the VM plan.yaml · ./x check · verify · stack up ./x 7 Work leaves only as a git bundle broker checks paths, tree hash; draft PR git bundle 8 Launcher terminates the VM on finish, the 4-hour cap or a stop command terminate INFERENCE, TESTED IN SPIKE S2 the warm-pool claim (step 1) and the instance-identity bootstrap (steps 2-3) Only egress from the VM (code profile) model gateway · brokers · CodeArtifact · ECR <tenant>.ghe.com · nothing else, no NAT
What to take from it: the VM never holds a write token or a model credential, the kit arrives once, and work can leave only as a git bundle the broker inspects. Steps 1-3 rest on inferences tested in spike S2 (see the risk below). Source: internal recommendation, §2.1, §2.3 steps 6-9 and §7.1.

Three details carry most of the security weight:1

  • The kit is handed over once. The identity broker matches the VM's AWS-signed instance-identity document to the run and returns the task bundle (all context labelled untrusted), a gateway run token and a read-only GitHub App token valid for 15-30 minutes. A second request gets nothing.
  • The agent is not root. Claude Code runs as the unprivileged user agent, blocked from the instance metadata service (IMDS, version 2, hop limit 1). The instance role only pulls images and packages, and only through the run's virtual private cloud (VPC) endpoints, so it is useless anywhere else.
  • Work leaves only as a git bundle. The VM never holds a write token. The git broker checks paths, file modes, sizes, symlinks and the tree hash, recreates the commits as impl[bot] and opens a draft pull request (chapter 09).

The agent plans first and cannot finish without green fast checks. It writes proof/plan.yaml, codes, runs ./x check --changed, then ./x verify or, from month 4, ./x stack up; a Stop hook enforces the plan and the checks. Its own screenshots and videos are marked trusted: false; the proof of record comes from verify-run, which the agent cannot touch (chapter 06).1

VM profiles: what code, code-ro, ro and research agents may read and reach 4 rows
VM profiles: what each agent type gets
ProfileAgent typesRepository accessNetwork reachData
codeimplement, prototype, maintenanceRead-only token (15-30 min); writes only as a git bundleGateway, brokers, mirrors, GHE.com tenantGreen: code and synthetic data
code-roinvestigate; triage (from gate F1, in an amber subnet)Read-only token; a failing test can come back as a draft PRAs codeGreen; masked non-production reads from month 6
roaskRead-only tokenAs codeGreen
researchresearchNoneGateway, brokers and a query-stripping fetch proxy to allowlisted sources; AgentCore Web Search (eu-west-1) from month 4Public sources only; no secrets, no internal network
Data tiers: green is code, docs, synthetic data and public sources; amber is operational metadata masked at ingest; red (production personal, financial and card data, and secrets) is never reachable by any agent. Source: internal recommendation, §2.1 and §4.1 Agent types are described in chapter 08.

Limits. A run gets at most 4 hours and two rounds of red CI, the same CI cap Stripe uses.17 !stop in the Slack thread cancels compute, revokes the run token, attaches an IAM deny policy and marks the registry. Cancelling always terminates the VM, and a reconciler sweeps every 5 minutes for VMs whose run has ended.1

Risk

Two load-bearing pieces are inferences, not tested facts. The instance-identity bootstrap and the warm-pool behaviour follow from standard AWS behaviour that the research did not cover. Spike S2, a two-week red-team exercise on a frozen build in weeks 10-12, tests them before W-tech, along with IMDS and instance-role abuse from the agent user, from containers and from outside the VPC.1

Recommendation

Launch VMs directly; keep GitHub Actions runners off the agent path. An earlier design ran the agent as an Actions job; the red team (issue 19) showed this needed extra runner hardening and broke exact-host egress, because runners need shared exposures and wildcard hosts. CI runner pools now serve only verify (PR code, no secrets) and trusted (main only).1

04.4

What a sandbox can reach

Four destinations, and nothing else. We assume the agent can read every byte in its VM, memory included, so nothing in the VM is worth stealing and nothing it could steal works anywhere else.1

The four destinations a code VM can reach, and what protects each
DestinationUsed forProtection
Model gatewayEvery model callRun token in a header; fail-closed budgets; kill switch; request-field allowlist; a hash-chained witness of every exchange (chapter 11)
Identity and git brokersCollecting the run kit once; returning work as a git bundleKit released once, against the AWS-signed identity document; path, mode and size policy; tree-hash check; draft PRs only
CodeArtifact and ECRPackages and container imagesPromoted mirrors only; package groups block upstream names by default; a 72-hour age gate; ECR pull-through on approved prefixes
<tenant>.ghe.comClone and read-only APIA read-only GitHub App token valid for 15-30 minutes
Both brokers sit in the control account. The research profile reaches only the gateway, the brokers and a query-stripping fetch proxy. Source: internal recommendation, §2.1 and §7.1.1

Six controls enforce the list, from the outside in: no network address translation (NAT) gateway, so no route to the internet; an exact-host proxy; DNS Firewall; a data perimeter on the VPC endpoints; a recorded TLS-inspection decision per destination; and a pull-only instance role.1 The proxy (AWS Network Firewall's proxy mode) has been generally available only since 19 November 2026, so a fallback on the same allowlist is ready.2

Packages are narrowed on the server, not in the repository. CodeArtifact package groups block every upstream name not on an allowlist, which stops "slopsquatting" (installing a hallucinated package name that an attacker has registered),15 and packages reach agents only after a 72-hour age gate.1

Positive probes matter as much as deny probes. Many toolchains ignore proxy variables, so W-tech requires four positive probes (a Gradle build, npm install, docker compose up and an emulator boot) to pass alongside the deny probes.1

Deep dive: each egress control, the package pipeline and the policy file 2 min

The six controls in one line each:1

  • No NAT gateway. The agent subnet has no route to the internet.
  • An exact-host proxy. AWS Network Firewall's proxy mode became generally available (GA) on 19 November 2026, Stockholm included.2 Because it is days old, a fallback on the same allowlist is kept ready: stateful domain rules behind NAT, or a self-run Envoy or Squid proxy (inference).
  • DNS Firewall (Route 53 Resolver) as a coarse deny-by-default layer.
  • A data perimeter. VPC endpoint policies admit only resources in the bank's AWS organisation (aws:ResourceOrgID) plus the named AWS buckets that hold ECR layers and CodeArtifact assets. Resource and service control policies sit on top. This closes the classic leak of uploading to an attacker's own bucket through a legitimate AWS endpoint.
  • A recorded TLS-inspection decision per destination. Filtering on the Server Name Indication (SNI) alone must be justified, because domain fronting still works without inspection.
  • A pull-only instance role, conditioned on the VPC's endpoints (aws:SourceVpce). The red team (issue 34) asked for a cross-account proxy for package pulls; we partly rebutted it, because a role that only pulls and only works inside the VPC is useless if stolen. S2 verifies the claim.

The package pipeline. CodeArtifact has no cooldown setting but keeps upstream publish times,16 so packages reach agents only by promotion from an upstream-connected staging repository after 72 hours. Install scripts are off and lockfiles frozen in the image and harness configuration, where the agent cannot edit them.1

Proxy settings. The image bakes them into the JVM (JAVA_TOOL_OPTIONS), Gradle, dockerd, container clients, Playwright and the Android emulator, so the positive probes can pass.1

platform/egress/code-profile.yamlillustrative
# Egress for the code profile. The real file is generated from policy.
profile: code
nat: none
proxy:                          # Network Firewall proxy, exact hosts only
  allow:
    - <model-gateway>:443          # run token; budgets; witness chain
    - <identity-broker>:443        # identity document once → run kit
    - <git-broker>:443             # git bundle out, nothing else
    - <codeartifact-domain>:443    # promoted packages only
    - <ecr-registry>:443           # approved pull-through prefixes
    - <tenant>.ghe.com:443         # read-only App token, 15-30 min
  tls_inspection: per-destination decision, recorded
fallback: same allowlist on stateful domain rules, or Envoy
probes:
  deny:     [any-other-host, imds-as-agent, s3-outside-org]
  positive: [gradle-build, npm-install, docker-compose-up, emulator-boot]
Illustrative. What to take from it: the allowlist is short enough to read in one glance, the fallback reuses the same list, and the probes test what must fail as well as what must work.
04.5

Testing several services together

From month 4 an agent can start a slice of the bank inside its own VM, and the outside world is always a twin, never a real vendor. Before then, contract and component tests carry integration. Five test layers each have a time budget.1

Five test layers, cheapest first
LayerRuns whereReal vs simulatedBudgetWhen the bank uses it
L0 unit and propertyRun's VM; CICode only<1 minLaunch
L1 componentRun's VM; CI; TestcontainersOne service with real infrastructure; other services stubbed from contracts<5 minLaunch
L2 local stack sliceRun's VM, through ./x stack upAffected services, their direct contract partners, infrastructure and an OTel collector; external world = twins<15 minMonth 4
L3 per-PR namespaceThe bank's Kubernetes, one namespace per PRAll services at the PR's commit; twins<30 minAt about 15 services
L4 vendor-connected stagingDedicated environmentVendor test environments; also run on release candidatesNightlyLater agents never use it
Take-away: agents work in L0-L2, all inside their own VM; shared environments come later and real vendor test systems never belong to agents. Source: research note t08 via design brief 2 (C5) and the internal recommendation, §6.3.1

At launch: L0, L1 and contracts. Component tests use Testcontainers with real infrastructure, such as Kafka in the light apache/kafka-native image.17 From weeks 5-8, oasdiff (OpenAPI), buf breaking (protobuf) and Pact catch breaking changes between services.1819 They run against main and the last released tag, because a monorepo removes compile-time skew between services but not deploy-time skew (inference).

From month 4: L2 slices. Inside the run's VM, ./x stack up starts the services the change touches, their direct contract partners, the infrastructure and an OTel collector from Compose profiles generated from the build graph; up --wait makes "ready" machine-checkable.20 Five to eight services plus infrastructure fit in 16 GB; the whole bank would not (inference).1

Figure 2 shows the slice for the running example, draft PR #214: a card spending-limit screen that Ingrid in the payments squad asked @agent for (ISSUE-12). Only the web app changes; card-controls, which enforces the limit at card authorisation, runs unchanged from main.

Figure 2. An L2 stack slice for the card spending-limit change
What ./x stack up --slice card-limits starts inside run 7f3c's VM
An L2 stack slice for the card spending-limit change Inside the run VM, bounded to 15 minutes: the web app at the pull request's head commit, the card-controls and ledger services from main as contract partners (the change does not modify card-controls), Postgres, Kafka and an OpenTelemetry collector. External parties are dashed twin boxes with fidelity labels: an eID broker twin built on mock-oauth2-server (protocol fake), a card processor twin built with WireMock from the vendor specification (spec stub) behind Toxiproxy for latency and connection resets, and a core banking twin built with Microcks from the vendor OpenAPI file (spec stub). The slice produces scenario assertions, an OTLP trace, a UI video and fake request journals; these are human aids, and verify-run reruns the scenario as proof of record. RUN VM (≤15 MIN) · ./x stack up --slice card-limits SERVICES TWINS: THE EXTERNAL WORLD apps/web head SHA · the change (UI) card-controls service main · enforces the limit ledger service main · contract partner Toxiproxy latency, reset eID broker twin mock-oauth2-server protocol fake Card processor twin WireMock · vendor spec spec stub Core banking twin Microcks · vendor OpenAPI spec stub Postgres container Kafka apache/kafka-native OTel collector traces from every service data, events login (OIDC) core API ILLUSTRATIVE SERVICE NAMES · EACH TWIN OWNED BY THE SQUAD THAT INTEGRATES IT WHAT COMES OUT Scenario assertions 7/7 · with fidelity labels OTLP trace trace.otlp.json UI video web.mp4 · trusted: false Fake journals a request journal per twin A human aid, not proof verify-run reruns the scenario as proof of record
What to take from it: the changed code runs at the PR's commit, its contract partners run from main, and every external party is a labelled twin, so a reviewer can see how far each scenario can be trusted. Illustrative; service names are examples. Source: internal recommendation, §6.3, and research note t08.
Deep dive: the agent's own run of this slice, and the proof of record 1 min

Figure 3 shows what the agent sees when it starts the slice and runs one scenario. The agent's run is only a human aid: for a multi-service change, the proof of record comes from verify-run and holds image digests, scenario assertions with fidelity labels, an OpenTelemetry Protocol (OTLP) trace, the twins' request journals and UI video (chapter 06).1

Figure 3. The agent runs the slice inside its VM
Illustrative terminal. What to take from it: the slice is up and healthy in under a minute, so the agent gets fast feedback, but its own run is only a human aid; verify-run reruns the scenario under main's harness as the proof of record. See the real synthetic bundle in the proof bundle demo.

Twins stand in for every external party, and each is owned by the squad that integrates that vendor, which fixes the red team's finding that twins were unowned (issue 29).1 WireMock and Microcks generate stubs (and Microcks conformance tests) from the vendor's own specifications;2122 mock-oauth2-server plays OpenID Connect (OIDC) parties such as ID-porten;23 Toxiproxy injects latency, resets and partitions.24

Every twin carries a fidelity label, shown on the proof page next to each scenario that used it. Where a vendor test environment exists, a scheduled loop runs the same scenarios against twin and vendor and opens an issue on any difference. NICS and straks (Norwegian interbank clearing and instant payments) have no public sandbox, so their scenarios are labelled "twin-only, fidelity unproven".1

Deep dive: vendor test environments, the NICS twin and the prior art 1 min

Where a vendor offers a test environment, the fidelity loop has something real to compare against:

  • Vipps MobilePay's merchant test environment has magic amounts and a force-approve endpoint;25
  • ID-porten's TestID allows headless login for synthetic users;26
  • card processors offer simulation endpoints.27

These environments belong to L4, and agents never use them. NICS and straks have no public sandbox, so their twin is built from the rails-adapter vendor's test environment and recorded traffic.1 The prior art is StrongDM's "Digital Twin Universe": behavioural clones of third-party services, validated against the live dependency "until we stop finding behavioral differences".28

L3 waits. Per-PR namespaces arrive at about 15 services; until then a slice is cheaper and faster. Okteto, which sells per-PR environments, says full replicas start to cost too much "usually around 30 to 50 services".3

Synthetic data only. The Digital Operational Resilience Act (DORA) standard on information and communication technology (ICT) risk lets non-production environments hold only anonymised, pseudonymised or randomised production data (Art. 16(5));29 the bank goes further, and nothing an agent can reach holds production personal data. Personas come from Tenor, the tax administration's synthetic population,30 and a scanner checks fixtures and artifacts for real Norwegian identity numbers (glossary).

Deep dive: synthetic identity numbers and the Faker trap 1 min

The Faker trap. Python Faker's Norwegian ssn() generates real-format fødselsnummer with valid check digits that may belong to real people, so it is wrapped or banned,32 and the scanner looks for fødselsnummer and D-numbers. Tenor's synthetic persons have 80 added to their birth month.3031 Validators also accept the new check-digit rule for numbers issued from 2032.33

The exception the bank does not use. DORA's standard allows raw production data outside production only by an approved, time-limited, reported exception (Art. 16(6)).29

Norwegian term

Fødselsnummer and D-nummer: the 11-digit Norwegian national identity numbers, for residents and for people without residence. Synthetic test numbers follow Skatteetaten's +80-month convention, so they cannot collide with a real person. See the glossary.

04.6

Mobile

Android proof runs on ordinary Linux VMs from month 4; iOS is a separate, costlier lane that starts only when iOS work starts. On both, signing keys never enter a sandbox: the app stores hold them, and release runners get only short-lived tokens.1

Mobile lanes: what each platform needs and where it runs
AndroidiOS
NeedsLinux with KVM (kernel virtual machine) for headless emulatorsApple hardware
WhereNested-virtualisation C8i instances in StockholmEC2 mac-m4 in Frankfurt (eu-central-1), then a second host in Ireland (eu-west-1)
Why thereNested virtualisation on non-metal Intel EC2 since 16 Feb 2026;34 C8i in Stockholm since 15 Jun 20265Stockholm has only Intel mac1, which runs macOS 15 at most and so Xcode 26.3 at most6
ToolingMaestro flows with --local; Paparazzi or Roborazzi screenshots on the JVM, no emulator neededSimulators; Maestro flows plus a native UI test
Cost and limitsOrdinary EC2 pricingUSD 1.476 an hour in Frankfurt and 1.353 in Ireland, as a dedicated host with a 24-hour minimum; new accounts start with zero host quota3536
StartsMonth 4When iOS starts
Take-away: Android fits the hosted lane; iOS adds Macs outside Stockholm, recorded as region exceptions. Source: internal recommendation, §2.1 and decision c52.1

Maestro must run with --local, because its legacy record command uploads raw screen capture to mobile.dev's servers.38

Deep dive: where emulators cannot run, iOS hosts and signing 1 min

Emulators. Android emulators cannot run inside Nitro Sandboxes, Lambda MicroVMs, Cloudflare, E2B or Vercel (for Nitro and Lambda an inference from their design), which is one more reason the hosted lane uses plain EC2; a Nitro Sandbox cannot even share an instance with nested virtualisation.37

iOS hosts. Apple's licence allows two macOS virtual machines per Mac host.39 GHE.com, the GitHub Enterprise Cloud offering with EU data residency, has no hosted macOS runners and gives no date,40 so the Macs are the bank's own. Xcode 27 will probably be required around spring 2027, which also rules out Stockholm's Intel Macs (inference).1

Signing. Under Play App Signing, Google holds the Android app-signing key;41 with Apple's cloud-managed certificates the private key stays with Apple;42 and App Store Connect API tokens are ES256 JSON Web Tokens (JWTs) that may be valid for at most 20 minutes.43 A small token broker mints them only for isolated release runners.1

04.7

Substrates we did not choose, and when we would

Plain EC2 is boring on purpose. Every alternative is newer, narrower, or outside the bank's control. The main one, Amazon Elastic Kubernetes Service (EKS) with Nitro Sandboxes, has a written trigger that would reopen the choice; for the others we note what would make us look again (statuses as of 24 November 2026; AWS-wide view in chapter 12).1

Sandbox substrates in brief: the verdict and what would change it
VerdictSubstratesWhat would change it
ChosenEC2 VM per run: a full VM with dockerd, and KVM on nested-virtualisation C8iThe EKS trigger in the next row
On triggerEKS Auto Mode with Nitro Sandboxes, announced 9 November 2026Over 400 runs a day, start SLO missed or queue p95 above 5 min → spike S7
ConditionalE2B and Northflank in the bank's own cloud account (BYOC)Bake-off S12, pencilled in for months 7-12
SkipAgentCore Runtime microVMs and Instances, Lambda MicroVMs, Fargate, the Claude Code cloud VM, Cloudflare Containers, Docker SandboxesEach falls short on Docker or KVM, run length, collector isolation, EU data controls or contract terms
All ten substrates compared: isolation, limits, status and trigger 10 rows
Sandbox substrates compared (status as of 24 November 2026)
Substrate and statusIsolation and DockerLimits that matterVerdict and trigger to revisit
EC2 VM per run
GA
Full VM; dockerd; KVM on nested-virtualisation C8iAny size; our own 4-hour cap; warm-pool start still to be provenChosen
Revisit on the EKS trigger below
EKS Auto Mode + Nitro Sandboxes
New: 9 Nov 202644
Hardware VM per pod; privileged dockerd confined to the sandbox kernel45No snapshot or pause; about half the advertised vCPUs on SMT (simultaneous multithreading) instances; no nested virtualisation on the same instance;3745 runtime binaries closed-source46On trigger
Over 400 runs a day, start SLO missed or queue p95 above 5 min → spike S7; Kata on a separate nested-virtualisation pool as the open-source exit
AgentCore Runtime microVMs
GA V2 in Stockholm, Nov 202647
Firecracker microVM; no Docker; arm64 only48At most 8 vCPU / 32 GB and 8 hoursSkip for coding
Revisit if microVMs gain Docker
AgentCore Runtime Instances
GA Aug 2026; privileged and KVM Nov 2026
EC2 in our account; privileged mode (Docker) and KVMOne agent per privileged session, and that agent can tamper with AgentCore's collectors49Not at launch
Revisit if collectors move out of a privileged agent's reach (inference)
Lambda MicroVMs
Launched 22 Jun 202650
Firecracker; containerd documented, Docker only community-reported8-hour wall-clock cap, suspended time included;51 public egress unless a VPC connector is attached52Skip for coding
Revisit with documented Docker and a longer cap
Fargate
GA
No privileged mode, only SYS_PTRACE, so no Docker inside53Fine for services, not for agent VMsControl plane only
It runs the Slack ingress
E2B BYOC (bring your own cloud)
BYOC on AWS Enterprise54
Firecracker; Docker; Apache-2.0 runtime that needs KVM55Enterprise contract; a new ICT third party with privileged access to our cloud accountConditional
Bake-off S12 is pencilled in for months 7-12 without a written trigger; the likely one is a need for fork, pause or snapshot (inference). E2B BYOC was the anchor of proposal P4
Northflank BYOC
Self-serve BYOC56
Cloud Hypervisor microVMs; Docker; no time limitSame third-party question as E2BConditional
Same bake-off, S12
Claude Code cloud VM
Available
VM per session: 4 vCPU, 16 GB, 30 GB disk; Docker57Transcripts in US storage; no zero data retention (ZDR) or customer-managed keys (CMEK); the default allowlist includes writable *.amazonaws.com, and GitHub, MCP and the Anthropic API bypass every network level5758Not for bank code
At most a ≤6-week public-data pilot after risk assessment, DPIA and transfer impact assessment; revisit if EU storage with ZDR or CMEK and a DORA addendum arrive
Cloudflare Containers
GA
Root docker:dind with host networking only; Testcontainers broken by default594 vCPU / 12 GiB / 20 GB defaults, raised only by negotiation; no KVM60Skip
The Cloudflare triggers in chapter 12
Docker Sandboxes (sbx), laptops
CLI v0.54.0 16 Nov 202666
MicroVM per sandbox with its own daemon; deny-by-default egress through a host proxy that injects credentials61Mandatory Docker login; central policy needs a paid subscription;62 customer defends Docker for agent actions14Not at launch
Revisit if legal accepts the AI-agent terms (open question)
Verdicts: Chosen in use at launch; On trigger or Conditional behind a port with a spike ready; Skip no role in year 1. Written triggers exist for EKS with Nitro Sandboxes, the Claude Code cloud VM and Cloudflare; the other "revisit" conditions are our reading of the facts. Sources: internal recommendation, decisions c30, c31, c33 and c13; reconciliation items c12, c31, c32, c40 and c42.1
Insight

The cheapest risk is the simplest full VM. At under 3% of total cost, compute is not worth optimising at the price of isolation clarity, Docker or KVM support, or a new ICT third party. AWS says a Nitro Sandbox warm pool claims a pre-booted VM "in about two seconds" (vendor claim),63 but our target is two minutes, and the substrate changes only on the written trigger above.41

Switching stays cheap. The launcher sits behind a port with three verbs (claim a VM, run a harness command, collect artifacts), and the image is a standard Open Container Initiative (OCI) image. A move to EKS or E2B changes the launcher, not the image, the proof chain or the coordinator (inference; see ports in chapter 03).

04.8

Many sessions at once

Parallelism is governed, not maximised. The scarce resource is reviewers' attention, not compute, so quotas follow a trust ladder and the queue pushes back when reviews lag (chapter 02).1

  1. Gate W-tech3 concurrent hosted runs per engineer; background low-risk (T0/T1) work; high-risk (T2) work stays interactive.Weeks 12-13
  2. Gate L8 runs per engineer; steering a running agent from Slack; scheduled maintenance loops.Month 5
  3. Gate F115 runs per engineer; triggers, LLM routing and an engine for durable waits.Month 6
  • Backpressure. An implement task queues while its requester has three or more unreviewed agent PRs, and the bot says why.
  • A cap on high-risk work. Open T2 agent PRs per domain are capped at twice that domain's certified approvers.
  • Capacity is measured, then bought. The start-time service-level objective (SLO), p95 ≤2 minutes, must hold on pilot runs to pass W-tech, and warm-pool size is tuned against it; the trigger in section 04.7 opens spike S7. More than three sessions per merged PR means staying at scenario A and funding verification instead.1
  • Model quotas are requested in week 0. Bedrock's default cross-Region quota for Sonnet 5.5 is 6 million tokens per minute (TPM), against 30 million for Opus 5.5, and can bind once verification runners scale.64
Figure 4. Sandbox compute is a sliver of monthly cost
Share of total monthly cost by scenario, %; the thin first segment is sandbox compute: 0.7%, 1.5% and 2.2%. Planning estimates, central case
What to take from it: even in scenario C, the heaviest use, sandbox VMs are about 2% of cost; people and tokens dominate, so optimising VM price is the wrong lever. The full cost scenarios are in chapter 13. Source: internal cost model (t17) via design brief 3, §3.3; EUR per month, central case; planning estimates.4
Deep dive: sandbox compute in euros, and a VM-hour against a session 1 min

In money, sandbox compute is about EUR 560, 2,450 and 8,430 a month in scenarios A, B and C: 0.7%, 1.5% and 2.2% of the total.4 For scale, a 4-vCPU, 16 GiB m7i.xlarge instance lists at USD 0.2142 an hour on demand in Stockholm,65 while a single agent session costs about USD 4.35-10.73 in model tokens on Bedrock's EU route, depending on the scenario (planning estimates).4

What the platform team does first: six actions with owners and dates 6 items
  1. Request Bedrock quota increases and the private offerOwner: build/CI for quotas; legal and procurement for the private offer · Week 0
  2. Build image v1 and the laptop baseline; run spike S14 on rootless DockerOwner: harness and evals · Weeks 0-4
  3. Build the launcher, warm AMI and warm pool, egress with its fallback and probes, and CodeArtifact promotionOwner: build/CI and sandboxes · Weeks 5-8
  4. Run spike S2 on a frozen build and measure start p95 for the W-tech gateOwner: security with build/CI · Weeks 10-12
  5. Bring up Android emulators on C8i and ./x stack up with squad-owned twinsOwner: build/CI, squads · Month 4
  6. Request EC2 Mac host quota in Frankfurt before iOS work is scheduledOwner: build/CI · When iOS starts

Sources

  1. Internal design document: the recommendation (decisions, architecture, roadmap and red-team fixes), §1.5, §2.1-§2.3, §4, §6.3, §7.1, §11 and §13. Lead architect, 24 Nov 2026; not published with this report.
  2. AWS Network Firewall launches explicit proxy functionality and NAT Gateway association. AWS What's New, 19 Nov 2026. aws.amazon.com/about-aws/whats-new/2026/11/network-firewall-proxy-nat-gateway
  3. Divert. Okteto docs, accessed 23 Nov 2026. okteto.com/docs/development/divert
  4. Internal cost model (research note t17) as summarised in design brief 3, §3.3: central case, EUR per month; planning estimates. Platform research, 24 Nov 2026; not published with this report.
  5. Amazon EC2 C8i instances are now available in Europe (Stockholm) region. AWS What's New, 15 Jun 2026. aws.amazon.com/about-aws/whats-new/2026/06/…c8i…stockholm-region
  6. Amazon EC2 instance types by Region (Mac families per Region). AWS documentation, retrieved 24 Nov 2026. docs.aws.amazon.com/ec2/latest/instancetypes/ec2-instance-regions
  7. Minions: Stripe's one-shot, end-to-end coding agents, part 2. Alistair Gray, Stripe, 19 Feb 2026. stripe.dev/blog/minions-…-part-2
  8. Why we built our own background agent. Ramp Builders, 12 Jan 2026. builders.ramp.com/post/why-we-built-our-background-agent
  9. Choose a permission mode. Anthropic, Claude Code docs, retrieved 23 Nov 2026. code.claude.com/docs/en/permission-modes
  10. AI coding agents' 0-click RCE flaw could hand attackers keys to the kingdom (Plugin4Shell). The Register, 17 Sep 2026. theregister.com/security/2026/09/17/ai-coding-agents-0-click-rce…
  11. Claude Code changelog (version 2.1.331). Anthropic, 23 Nov 2026. code.claude.com/docs/en/changelog
  12. Development containers. Anthropic, Claude Code docs, updated about 20 Nov 2026. code.claude.com/docs/en/devcontainer
  13. Configure the sandboxed Bash tool. Anthropic, Claude Code docs, updated about 20 Nov 2026. code.claude.com/docs/en/sandboxing
  14. Docker Subscription Service Agreement. Docker, last updated 26 Aug 2026. docker.com/legal/docker-subscription-service-agreement
  15. Well-architected best practices for software supply chain security. AWS Security Blog, 1 Jun 2026. aws.amazon.com/blogs/security/well-architected-…-supply-chain-security
  16. Dependency cooldowns (CodeArtifact section). cooldowns.dev, 27 Apr 2026 (secondary source). cooldowns.dev
  17. Kafka module (apache/kafka and apache/kafka-native). Testcontainers for Java, accessed 23 Nov 2026. java.testcontainers.org/modules/kafka
  18. oasdiff releases (v1.39.0). oasdiff on GitHub, 17 Nov 2026. github.com/oasdiff/oasdiff
  19. Pact open source updates, May and September 2026. Pact docs blog, 14 Sep 2026. docs.pact.io/blog
  20. docker/compose releases (v5.0.0 and v5.8.0). Docker on GitHub, 17 Nov 2026. github.com/docker/compose/releases
  21. AI features in WireMock OSS and WireMock Cloud. wiremock.org, accessed 23 Nov 2026. wiremock.org/docs/solutions/ai
  22. Microcks 1.16.0 release. microcks.io, 13 Nov 2026. microcks.io/blog/microcks-1.16.0-release
  23. mock-oauth2-server 7.0.1. NAV (navikt) on GitHub, 16 Nov 2026. github.com/navikt/mock-oauth2-server
  24. Toxiproxy v2.13.0. Shopify on GitHub, 14 Oct 2026. github.com/Shopify/toxiproxy
  25. Vipps MobilePay test environment. Vipps MobilePay developer docs, 16 Oct 2026. developer.vippsmobilepay.com/docs/knowledge-base/test-environment
  26. Automatisert testing med ID-porten (automated testing with ID-porten). Digdir, accessed 23 Nov 2026. docs.digdir.no/docs/idporten/oidc/oidc_func_apitesting
  27. Simulating transactions. Marqeta docs, 16 Oct 2026. marqeta.com/docs/core-api/simulating-transactions
  28. Digital Twin Universe. StrongDM Software Factory, 5 Feb 2026. factory.strongdm.ai/techniques/dtu
  29. Commission Delegated Regulation (EU) 2024/1774, the DORA RTS on the ICT risk-management framework, Arts. 8 and 16. EUR-Lex, 2024 (in force in Norway since 1 Jul 2025). eur-lex.europa.eu/…CELEX:32024R1774
  30. Om Tenor testdatasøk (about the Tenor test-data search). Skatteetaten, accessed 23 Nov 2026. skatteetaten.github.io/testnorge-tenor-dokumentasjon
  31. Testmiljø og testdata, Skatteetatens API-er (test environments and test data). Skatteetaten, accessed 23 Nov 2026. skatteetaten.github.io/api-dokumentasjon/en/test/testmiljo
  32. faker/providers/ssn/no_NO/__init__.py. joke2k/faker on GitHub, last changed 24 Mar 2025. github.com/joke2k/faker/…/ssn/no_NO
  33. Nye fødselsnummer og d-nummer fra 2032 (new national identity numbers from 2032). Skatteetaten, accessed 23 Nov 2026. skatteetaten.no/en/deling/folkeregisteret/pid
  34. Use nested virtualization to run hypervisors in Amazon EC2 instances. Amazon EC2 User Guide, 15 Sep 2026. docs.aws.amazon.com/AWSEC2/…/amazon-ec2-nested-virtualization
  35. Amazon EC2 Mac instances. AWS, 18 Nov 2026. aws.amazon.com/ec2/instance-types/mac
  36. AWS Price List API bulk offer files (Amazon EC2 in eu-central-1, eu-west-1 and eu-north-1). AWS, publication 23 Nov 2026. pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json
  37. Isolate workloads with AWS Nitro Sandboxes. Amazon EC2 User Guide, 16 Nov 2026. docs.aws.amazon.com/AWSEC2/…/amazon-ec2-nitro-sandboxes
  38. Record your Flow. Maestro docs, 4 Aug 2026. docs.maestro.dev/…/record-your-flow
  39. Apple Software License Agreement for macOS (EA2005). Apple, 11 Jul 2026. apple.com/legal/sla/docs/macOS27.pdf
  40. Feature overview for GitHub Enterprise Cloud with data residency. GitHub Docs, 17 Nov 2026. docs.github.com/en/enterprise-cloud@latest/admin/data-residency/…
  41. Use Play App Signing. Google Play Console Help, accessed 23 Nov 2026. support.google.com/googleplay/android-developer/answer/9842756
  42. Cloud-managed certificates. Apple Developer Help, accessed 23 Nov 2026. developer.apple.com/help/account/certificates/cloud-managed-certificates
  43. Generating tokens for API requests. Apple, App Store Connect API docs, accessed 23 Nov 2026. developer.apple.com/documentation/appstoreconnectapi/generating-tokens…
  44. Introducing AWS Nitro Sandboxes on Amazon EKS, ECS and EC2 for hardware isolated pods, tasks and VMs. AWS What's New, 9 Nov 2026. aws.amazon.com/about-aws/whats-new/2026/11/nitro-sandboxes-eks-ecs-ec2
  45. Considerations (Nitro Sandboxes). Amazon EKS User Guide, accessed 23 Nov 2026. docs.aws.amazon.com/eks/latest/userguide/sandboxing-limitations
  46. firecracker-containerd README (archived; points users to Nitro Sandboxes). firecracker-microvm on GitHub, 10 Nov 2026. github.com/firecracker-microvm/firecracker-containerd
  47. Release notes for Amazon Bedrock AgentCore (May-November 2026 entries). AWS, accessed 23 Nov 2026. docs.aws.amazon.com/bedrock-agentcore/latest/devguide/release-notes
  48. Compare compute types (AgentCore Runtime microVMs and Instances). AWS AgentCore Developer Guide, retrieved 24 Nov 2026. docs.aws.amazon.com/bedrock-agentcore/…/runtime-instances-how-it-works
  49. Configure the privilege mode (AgentCore Runtime Instances). AWS AgentCore Developer Guide, retrieved 24 Nov 2026. docs.aws.amazon.com/bedrock-agentcore/…/runtime-instances-privilege-mode
  50. Run isolated sandboxes with full lifecycle control: AWS Lambda introduces MicroVMs. AWS News Blog, 22 Jun 2026. aws.amazon.com/blogs/aws/…-aws-lambda-introduces-microvms
  51. Lambda quotas (durable functions, MicroVMs). AWS Lambda Developer Guide, accessed 23 Nov 2026. docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits
  52. Lambda MicroVMs networking (egress connectors). AWS Lambda Developer Guide, accessed 23 Nov 2026. docs.aws.amazon.com/lambda/latest/dg/microvms-networking
  53. Amazon ECS task definition differences for Fargate. Amazon ECS Developer Guide, 18 Jun 2026. docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-tasks-services
  54. BYOC (bring your own cloud). E2B docs, accessed 23 Nov 2026. docs.e2b.dev/byoc
  55. e2b-dev/infra README (Apache-2.0; Terraform for AWS; needs KVM). E2B on GitHub, 23 Nov 2026. github.com/e2b-dev/infra
  56. Sandboxes in your own cloud. Northflank docs, accessed 23 Nov 2026. northflank.com/docs/v1/application/sandboxes/sandboxes-in-your-own-cloud
  57. Configure cloud environments. Anthropic, Claude Code docs, read 23 Nov 2026. code.claude.com/docs/en/cloud-environments
  58. Where are your servers located? Do you host your models on EU servers?. Anthropic Privacy Center, 15 Jun 2026. privacy.claude.com/en/articles/7996890-…
  59. Containers FAQ. Cloudflare docs, accessed 24 Nov 2026. developers.cloudflare.com/containers/faq
  60. Containers limits. Cloudflare docs, accessed 24 Nov 2026. developers.cloudflare.com/containers/platform/limits
  61. Docker Sandboxes: security model. Docker docs, read 23 Nov 2026. docs.docker.com/ai/sandboxes/security
  62. Docker Sandboxes: FAQ. Docker docs, read 23 Nov 2026. docs.docker.com/ai/sandboxes/faq
  63. AWS Nitro Sandboxes: Hardware-enforced workload isolation on Amazon EKS. AWS Containers Blog, 9 Nov 2026. aws.amazon.com/blogs/containers/aws-nitro-sandboxes-…-on-amazon-eks
  64. Amazon Bedrock endpoints and quotas. AWS General Reference, retrieved 23 Nov 2026. docs.aws.amazon.com/general/latest/gr/bedrock
  65. EC2 on-demand Linux price map, EU (Stockholm). AWS pricing data, retrieved 23 Nov 2026. b0.p.awsstatic.com/pricing/2.0/…/EU (Stockholm)/Linux
  66. docker/sbx-releases (v0.54.0). Docker on GitHub, 16 Nov 2026. github.com/docker/sbx-releases/releases