# Sprites + Tokenizer: Secret-injecting proxy pattern for sandboxed AI agents?

**URL:** <https://community.fly.io/t/sprites-tokenizer-secret-injecting-proxy-pattern-for-sandboxed-ai-agents/27054>\
**Category:** General\
**Tags:** wishlist, security, sprites, login-only\
**Created:** [February 5, 2026, 1:52pm UTC](https://community.fly.io/t/sprites-tokenizer-secret-injecting-proxy-pattern-for-sandboxed-ai-agents/27054 "2026-02-05T13:52:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rdhyee](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rdhyee/32/44295_2.png) [@rdhyee](https://community.fly.io/u/rdhyee)\
**Post date:** [February 5, 2026, 1:52pm UTC](https://community.fly.io/t/sprites-tokenizer-secret-injecting-proxy-pattern-for-sandboxed-ai-agents/27054/1 "2026-02-05T13:52:32Z")

</div>

I’ve been experimenting with Sprites as sandboxed environments for running Claude Code autonomously, and I’m trying to figure out the best way to give sandboxed code access to external APIs _without_ putting credentials inside the sandbox.

> **Core question:** Is there a supported way for Sprites to call internal Fly services (6PN / Flycast / .internal), or are Sprites intentionally isolated to `*.sprites.app` + public egress only?

## The Pattern

Simon Willison recently wrote about [Deno Sandbox](https://simonwillison.net/2026/Feb/3/introducing-deno-sandbox/), which uses a “secret-injecting proxy” — the sandboxed code never sees credentials; instead, an intermediary proxy injects them into outbound requests. In that post, Simon noted:

> From [a comment on Hacker News](https://news.ycombinator.com/item?id=46874097#46874959) I learned that Fly have a project called [tokenizer](https://github.com/superfly/tokenizer) that implements the same pattern. Adding this to my list of tricks to use with sandboxed environments!

This is exactly what I want for Sprites. The architecture I’m imagining:

```auto
Sprite (sandboxed client) → Tokenizer (proxy) → External APIs
     NO secrets injects creds (GitHub, OpenAI, etc.)

```

The sandboxed code can make authenticated API calls, but can never exfiltrate the credentials — even if the code running inside is untrusted.

## What I’ve Found So Far

I did some network probing from inside a Sprite:

```auto
# ip addr show (inside sprite)
5: spr0@if6: ...
    inet 10.0.0.1/24 scope global spr0
    inet6 fdf::1/64 scope global

# cat /etc/resolv.conf
nameserver 10.0.0.2
nameserver fdf::2

```

The IPv6 prefix is `fdf::`, not Fly’s 6PN `fdaa::`, and DNS points to the sprite’s own resolver rather than `.internal`. So **Sprites appear to be on their own isolated network, not on the Fly private network (6PN)**.

This means a Tokenizer instance running as a regular Fly Machine wouldn’t be reachable from a Sprite via `.internal` DNS.

## My Questions

1. **Is there any way for a Sprite to reach a Fly Machine on the private network?** Or are Sprites intentionally fully isolated from 6PN?

2. **Could Tokenizer run as a Sprite itself?** Then the client Sprite would reach it via its `.sprites.app` URL. Is Sprite-to-Sprite communication (via HTTPS through the Fly proxy) a supported pattern?

3. **Is there a roadmap for Sprite ↔ Machine private networking?** The `spr0` interface and `fdf::` prefix suggest a custom network layer that could potentially bridge to 6PN in the future.

4. **Has anyone else tried this pattern with Sprites?** Running AI coding agents (Claude Code, Codex, etc.) in Sprites is a natural use case, and secret management feels like the biggest friction point.

## Use Case

I’m running Claude Code inside a Sprite with checkpoints (great feature — auth state survives restore!). The missing piece is letting CC make authenticated API calls (git push, API requests) without baking secrets into the sandbox. The Tokenizer proxy pattern would solve this cleanly.

Would love to hear from the Fly/Sprites team or anyone who’s explored similar setups.

---

_[View the full topic](https://community.fly.io/t/sprites-tokenizer-secret-injecting-proxy-pattern-for-sandboxed-ai-agents/27054)._
