Tips & troubleshooting
Tips & troubleshooting.
Practical setups for agents and caches, then the fixes for the problems that come up most often.
Build a practical agent workspace
Keep dependency and build caches private to the project. Share only the agent state that genuinely needs to follow you:
[state.project]
cargo-home = { target = "~/.cargo" }
cargo-target = { target = "./target" }
[state.user]
codex = { target = "~/.codex" }
[quick]
codex = ["codex"]
check = ["cargo", "test", "--workspace"]
This layout lets an agent reuse credentials while keeping compiled dependencies specific to one canonical project.
User state is visible to every project that enables the same logical name. Keep project secrets out of it.
Pass credentials by name
API keys belong in the environment of the terminal that creates the container. Name them in configuration and export the values in that shell:
env_vars = ["OPENAI_API_KEY", "ANTHROPIC_API_KEY"]
export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
silo start
silo start, the first silo run, and an isolated run capture the allowlist. Later terminals can attach to the running shared container without exporting the variables again. Exporting a new value in those terminals leaves the running container unchanged. silo stop the container and create it again after rotating a key.
Write the names into config, and keep the values in the environment. User state such as ~/.codex is a separate choice: it shares files with every project that mounts the same name. Use env_vars for API keys, and user state for tool data you intend to reuse. The schema is in environment configuration.
Run cooperating tools concurrently
Open separate host terminals in the same project and start each tool normally:
# Terminal one
silo run -- codex
# Terminal two
silo run -- cargo watch -x test
# Terminal three
silo run
All three sessions share the same container processes, project mount, and ephemeral filesystem. Closing one does not stop the others. Use isolated mode instead when tools should not observe each other's processes or temporary container state.
Use quick commands as a project vocabulary
Quick commands are most useful for stable entry points, not every shell expression:
[quick]
test = ["just", "test"]
lint = ["just", "lint"]
agent = ["codex", "--full-auto"]
Arguments append naturally—silo test api becomes just test api. Project commands inherit global names and replace only a same-named command.
Since Silo executes an argument vector rather than a shell string, pipes, redirects, and environment assignments need an explicit shell:
[quick]
logs = ["sh", "-lc", "just logs | tail -n 100"]
Connect to a host service
Allow only the loopback ports the project needs:
host_ports = [5432, 8080]
Use the same IPv4 loopback ports inside the shared container:
psql -h 127.0.0.1 -p 5432
curl "http://127.0.0.1:8080/health"
Use each configured port directly: the tunnel keeps the same port number on the Mac and inside the container. Isolated runs ignore host ports with a warning; custom derivatives support them in shared mode.
Tune resources deliberately
Put stable limits in configuration and use flags for exceptional runs:
container.cpus = 4
container.memory = "6G"
silo run --cpus 8 --memory 12G -- cargo test
Resource settings apply when a container is created. Silo joins an already-running shared project container without comparing or changing its limits. New settings apply after the container is recreated.
Enable elevation deliberately
The Silo base keeps sudo access disabled by default. Enable it persistently for a project with container.sudo = true, or opt in for one invocation:
silo run --sudo -- sudo apt-get update
Sudo is a container creation setting. In shared mode, concurrent sessions use the same silo user and therefore share the access selected when the container was created. A changed setting applies after recreation. Use --isolated --sudo when elevation must be confined to a one-shot container. The policy applies equally to default and custom derivatives.
Choose protected paths for the workflow
Silo leaves the working tree writable while protecting existing Git and Jujutsu metadata by default. If agents or other tools should modify that metadata, disable the project overlays in the project file:
workspace.read_only = []
Use literal relative paths to protect additional directories, for example workspace.read_only = [".git", ".jj", ".github"]. Missing paths are skipped. A present file, broken symlink, or path that leaves the project is skipped with a warning because Apple container bind mounts require safe directory sources; silo config check reports those warnings and rejects malformed entries.
A read-only .git directory does not hide .github. Silo remounts that neighboring directory so it stays visible and writable. The mechanism is in read-only paths.
Inspect before cleanup
silo config path
silo config list
silo config check
silo containers
silo state
This sequence answers which files contributed, what Silo actually sees, whether the result is valid, which containers are active, and which durable directories exist.
Delete runtime containers independently from durable state:
silo containers delete my-project
silo state delete <full-state-id>
Deleting managed state removes that data permanently.
Add project-specific tools
Use a custom Dockerfile to replace Silo's default extras while retaining its runtime behavior:
# Dockerfile.silo
FROM silo-base:latest
USER silo
# Add the project-specific tools you need here.
RUN brew install go
USER root
image.dockerfile = "./Dockerfile.silo"
[binds]
artifacts = { source = "./artifacts", target = "./artifacts", access = "read-write" }
A home-relative path such as image.dockerfile = "~/silo/Dockerfile" is resolved from the host home directory, so the global config can select one derivative for every project. That host ~/… form is not the same as a mount target: bind and state ~/… targets still mean /home/silo inside the container.
The Dockerfile must have exactly one stage and use that literal base spelling. silo image build rewrites it to an internal stage so the name is not sent to a registry resolver. silo image update builds that same file unchanged, with --no-cache, against the local silo-base:latest image and publishes the same custom tag. Shared sessions, shells, /home/silo, sudo, host ports, and project/user managed state remain available when the derivative preserves their base requirements. Selecting a custom Dockerfile replaces the extras layer rather than extending it, so reinstall Codex, Claude Code, Node.js, or any other default extras you still want, then add language toolchains, browsers, extra agents, and editors there.
Troubleshooting
container is not on PATH
Silo runs Apple's container command from PATH. Install it from the container documentation, then open a new terminal. container --version should succeed before silo image build.
silo or cargo is not on PATH
Open a new terminal after installing Rust or Silo so ~/.cargo/bin is on PATH. See the Rust installation guide if Cargo itself is missing.
The image build is still running
The first silo image build installs a full toolchain and can take a long time. Later, silo image update rebuilds only the tool layer.
A changed setting seems to be ignored
The image, mounts, resources, sudo access, host ports, and environment names apply when a container is created. silo containers shows a shared container that is already running. silo stop lets the next silo run or silo start create a new one. Active sessions block a normal stop until they exit. --force terminates them.
The selected image is not built yet
Build the currently configured image:
silo image build
When silo-base:latest is already present and only the tool layer should be recreated, run silo image update from the project whose configuration should apply. Update republishes silo:latest or the configured custom tag, leaves the base tag in place, and does not replace a running container. If update reports that the base is not built yet, run silo image build.
If a project selects a custom Dockerfile, run the command from that project so its configuration and relative path are active. After upgrading Silo, run silo image build again. The entrypoint, lifecycle helper, and sshd config are baked into the base, and stable local image tags are trusted rather than version-negotiated at run time.
The Apple container system is unavailable
Check the runtime directly with container system status. Silo attempts to start the system for image builds and first-use paths that require it, but kernels and service failures belong to Apple's CLI.
The host-port tunnel cannot start
Confirm that ssh and ssh-keygen are installed on the host, rebuild the selected image after upgrading Silo, and check that the configured port is free inside the container. Host ports are intentionally unavailable for --isolated runs.
An unknown config key is rejected
Read the error's field name, source path, and parser location, fix the likely typo, then run silo config check.
A bind source cannot be resolved
Run silo config check, then confirm that the source exists and is a directory. Relative sources from both global and project configuration resolve from the selected project root; ~ expands from the host home. Broken symlinks are rejected. See validation and diagnostics for the complete preflight contract.
A custom image fails its contract check
Confirm the Dockerfile has exactly one stage beginning with a literal FROM silo-base:latest, uses Docker's default backslash escape directive, and remains below 16 KiB after Silo adds its runtime base. It must leave the silo user, home, entrypoint, core helpers, and supported shells usable by the startup smoke test. ARG-based base forms are rejected. silo image build and silo image update both leave the previously published derivative tag available when the new candidate fails; changes outside the smoke test remain the custom image author's responsibility.
A container cannot be deleted because it is active
Let its sessions exit and retry. Use --force only when terminating those shells, commands, or agents is intentional.
Managed state is still referenced
List containers, end active sessions, and delete stopped containers that still reference the state directory. Silo intentionally offers no force-delete path for in-use durable storage.
A quick command is unknown or unusable
Inspect the effective [quick] table with silo config list. Project commands merge with global commands by name. Names cannot be blank, shadow built-ins, or start with -; each array must begin with a non-blank executable.