Repository navigation
Closed
Description
Sessions need tools the default image lacks: Rust, .NET, a pinned TypeScript toolchain, company CLIs, Claude Code skills and plugins. Today the options are a setup script that installs them in every session, or an image you build and document yourself. This project has no setup script, so a session working on fctl installs rustup and builds from cold. That took about 6 GB of disk in #14's session.
Part of this exists:
- Per project:
imagein the project settings (Settings → Sandbox image), which maintainers and owners can change. The host uses it instead of its default (crates/fctl-host/src/session.rs), and the Apple and Docker drivers pull it when it's missing (crates/fctl-host/src/driver/container.rs). - Per host: the default image,
fctl-agent:latest, set withfctl host install --imageand built fromimages/agentbyfctl host image build [tag]. - The contract is one sentence in
images/agent/README.md:sh,tail, git and Claude Code on the PATH. fctl copies its supervisor (a static musl binary, so any libc works) into/opt/fctl/binas root and runs it as the image's user, in~/workspace.
#2 publishes the default image so custom images can start FROM it. This issue covers the rest, and can land in parts.
What should happen
- Write the contract down in a "Sandbox images" page in
docs/:- Required tools: the ones above, plus
gh(fctl-agent uses it to find the session's pull request and silently does without). - A non-root user with a writable home.
- Architectures: Apple silicon hosts need arm64 images.
- The oldest Claude Code version fctl works with, because it relies on stream-json control requests (
oauth_token_refresh,remote_control). fctl-agent should checkclaude --versionat start and fail with a clear message below it. - What fctl writes into the sandbox (see 3).
- A worked example
FROMthe published image that adds Rust.
- Required tools: the ones above, plus
- CLI. Project settings can't be changed from the CLI:
fctl-clienthasupdate_project, butfctl projectshas no command for it. Addfctl projects settings <project> [--image …] [--setup-script …] [--env KEY=VALUE …]with--json. - Keep the image's Claude configuration.
write_claude_config(crates/fctl-agent/src/supervisor.rs) overwrites~/.claude/settings.json, so an image's user settings (enabled plugins, marketplaces, hooks, permissions) are lost. Skills in~/.claude/skillssurvive. Merge fctl's keys into what the image ships, and dropapiKeyHelperandANTHROPIC_*entries inenv(the rules inproject_settings_are_unsafe). Skills committed to the repository (.claude/skills) already load. - Build from the repository. Many repositories already describe their environment in a Dockerfile or
.devcontainer/devcontainer.json. A project setting pointing at one would let hosts build the image, cache it per project, and rebuild it when the file changes on the base branch. Builds run on people's machines, so they need limits and a size bound (see Shared package caches per project #3). - Let host owners decide what runs.
- The risk: a maintainer's image runs on machines that belong to other people, with the starter's Claude token and the session's GitHub token inside it. A full login's token is short-lived, but a long-lived token from
claude setup-tokenis valid for a year. - Add
allowed_imagesto the host config: exact references or registry prefixes, optionally pinned to digests. - The host advertises the list as an optional field when it connects. FleetDO schedules sessions only on hosts that allow their image, and a session no host can run says why ("No host runs images from ghcr.io/acme").
docs/security.mdshould say that whoever sets the image or the setup script can read the credentials of the people who start sessions.
- The risk: a maintainer's image runs on machines that belong to other people, with the starter's Claude token and the session's GitHub token inside it. A full login's token is short-lived, but a long-lived token from
- Show it in the app. The hosts page shows each host's default and allowed images. The image setting's hint says it only applies to the Apple container and Docker drivers: Lima uses its prepared
fctl-baseVM, and the process driver has no image. - Private registries. Pulls use the host's own registry login (
docker login,container registry login). Document that, or decide to pass registry credentials from project secrets.
Compatibility: new settings are optional fields in ProjectSettings, and a host that doesn't know about allowed_images behaves as it does now.
🤖 Generated with Claude Code
Activity
fctl-sh commentedon Oct 18, 2026
For point 2 (
fctl projects settings): #19 asks for--connectors on|offon that command, settingProjectSettings.claude_ai_connectors, which #32 adds. Since an update replaces all settings, read the project first and send its settings back with your changes. #32 keeps the storedclaude_ai_connectorswhen an update leaves it out, but other fields have no such guard.Session: https://app.fctl.sh/s/ses_01M564VCYM35Z4JVYCMFQ73EZ6
feat: turn off claude.ai connectors for a project (#32)
fctl-sh commentedon Oct 18, 2026
For point 1: #39 (for #2) adds
docs/sandbox-images.md, the "Sandbox images" page. It has:FROMit can rely on (theagentuser with uid 1000 and passwordless sudo,~/.local/binand/opt/fctl/binfirst on the PATH, the tools), checked on every build byimages/agent/check.sh;images/agent/README.md:sh,tail, git and Claude Code on the PATH, plus a user with a writable home (fctl-agent writes~/.fctl) and arm64 images for Apple silicon hosts;FROMexample that installs a package as root and switches back toagent.Point 1 still needs
ghamong the required tools, the oldest Claude Code version (and fctl-agent's check of it), what fctl writes into the sandbox (point 3), and the worked example that adds Rust.Session: https://app.fctl.sh/s/ses_01M56C4589JCHJ2W8TXC8V2S4P
feat: add Python 3.15, Rust, Bun and TypeScript to the sandbox image (#…
fctl-sh commentedon Oct 18, 2026
On the tools the default image lacks: #45, released in v0.3.0, adds Rust 1.99.0 (rustup, with rustfmt, Clippy and
wasm32-unknown-unknown, matchingrust-toolchain.toml), Python 3.15.0 with uv 0.13.1, TypeScript 7.0.2 and Bun 1.4.3 toimages/agent. A session working on fctl no longer installs rustup before it builds. The image's own README lists everything it contains.It doesn't do any of the numbered items here; .NET and company CLIs still need a custom image.
Session: https://app.fctl.sh/s/ses_01M56D7AEK3XQYQJH6TQXYMDZ5
feat(host): pull the sandbox image from GHCR instead of building it (#39
fix: close the gaps a review found in image allowlists and builds
fctl-sh commentedon Oct 18, 2026
Checked what was left here; #88 does the rest, and hyperstructure/fctl-site#16 updates the privacy policy to match.
Already done before: point 1 in part. #39 added the "Sandbox images" page: the published image, its layout, and the
FROMcontract.Done in #88 (open, CI running):
gh, a non-root user and both architectures. Claude Code must be 2.1.101 or later, the first release that asks its host for fresh OAuth tokens (oauth_token_refresh;remote_controlcame in 2.1.63). fctl-agent checksclaude --versionat start and fails with a clear message below it. The page also covers what fctl writes into a sandbox, and has a worked example that adds .NET; Rust has been in the default image since feat: add Python 3.15, Rust, Bun and TypeScript to the sandbox image #45.fctl projects settakes--image,--build,--build-context,--setup-script,--env,--unset-env,--cpusand--memory. I added them toset, which already existed, rather than a newsettingscommand.~/.claude/settings.json, and dropsapiKeyHelper,ANTHROPIC_*and provider variables.image_buildsetting names a Dockerfile or devcontainer.json.build_timeout_minutes,max_build_mb. Hosts keep the newest build per project.allowed_imagesandallowed_buildsinhost.tomlreach FleetDO as optional hello fields. Sessions wait with a reason when no runner allows their image.docs/security.mdcovers the risk.Left once it merges:
dockerand a fake GitHub only.Session: https://app.fctl.sh/s/ses_01M57YPG1ATK9ARAXTZG43G51J
docs(legal): say what hosts download for projects' images (#16)