This guide explains the current configuration model.
~/.stakpak/config.tomlis the source of truth for behavior profiles.~/.stakpak/autopilot.tomlis for runtime wiring (schedules/channels/service settings).- Schedules/channels should reference profiles using
profile = "name". - Runtime fields transported per-run are:
modelauto_approvesystem_promptmax_turns
- Inline channel
model/auto_approvestill work for compatibility, but are deprecated.
Autopilot now has a shared readiness/probe system used by both:
stakpak up— fail-fast startup checksstakpak autopilot doctor— fuller deployment-readiness report
Blocking failures:
- credentials configured
- Docker installed
- Docker accessible to the current user
- clearly unsafe memory conditions
Warnings:
- bind-port conflicts
- disabled systemd linger
- low memory headroom
In addition to the startup probes, doctor also reports:
- disk space headroom
- critical sandbox mount readability hints
- channel config validity
- schedule config validity
- service installation status
- server health reachability
- tool approval posture
stakpak upnow runs preflight checks before image pull/service start- sandbox permission issues are addressed by mapping the host UID/GID into the container runtime when possible
- secret/config files should not be made world-readable as a workaround
Autopilot spawns a Docker-based sandbox container to isolate subagent tool calls. The sandbox_mode field in [server] controls the container lifecycle:
[server]
listen = "127.0.0.1:4096"
sandbox_mode = "ephemeral" # or "persistent" (default)| Mode | Behavior | Startup requirement |
|---|---|---|
persistent (default) |
Single container spawned at startup, reused for all sessions. If the container fails to start, autopilot refuses to start. | Docker + working image for host arch |
ephemeral |
Container spawned per-session only when sandbox: true is requested. The sandbox image is still pulled/validated at startup so Docker progress is visible. |
Docker + working image for host arch |
| Probe | Meaning | Typical fix |
|---|---|---|
docker_installed |
Docker binary missing | Install Docker |
docker_accessible |
User cannot talk to daemon | Add user to docker group / start daemon |
memory |
Host is too small or borderline | Use 2GB+ RAM or add swap |
disk_space |
Low free space for image pulls/logs | Free space or expand volume |
bind_port |
Listen address unavailable | stakpak down or change bind |
systemd_linger |
User service may stop after logout | sudo loginctl enable-linger $USER |
sandbox_mount_inputs |
Critical mounted inputs may be unreadable | Fix invoking-user readability; do not loosen secret perms globally |
Use stakpak autopilot doctor as the canonical deployment-readiness and remediation entrypoint.
Use this for profile behavior and credentials.
[profiles.default]
api_key = "sk-..."
model = "anthropic/claude-sonnet-4-5"
allowed_tools = ["view", "search_docs", "run_command"]
auto_approve = ["view", "search_docs"]
system_prompt = "You are the production reliability assistant."
max_turns = 64
[profiles.monitoring]
model = "anthropic/claude-haiku-4-5"
allowed_tools = ["view", "search_docs"]
auto_approve = ["view", "search_docs"]
system_prompt = "Monitor and report only. Never make changes."
max_turns = 16
[profiles.ops]
model = "anthropic/claude-sonnet-4-5"
allowed_tools = ["view", "search_docs", "run_command", "create", "str_replace"]
auto_approve = ["view", "search_docs", "run_command"]
max_turns = 64Use this for schedules/channels and runtime config.
[server]
listen = "127.0.0.1:4096"
[[schedules]]
name = "health-check"
cron = "*/5 * * * *"
prompt = "Check production health"
profile = "monitoring"
[channels.slack]
bot_token = "xoxb-..."
app_token = "xapp-..."
profile = "ops"stakpak autopilot schedule add health-check \
--cron '*/5 * * * *' \
--prompt 'Check production health and report anomalies' \
--profile monitoringcheck script paths support ~, which resolves against the HOME of the user running autopilot.
For systemd/launchd/container deployments, prefer absolute paths (for example, /home/ec2-user/.stakpak/checks/endpoints.sh).
stakpak autopilot channel add slack \
--bot-token "$SLACK_BOT_TOKEN" \
--app-token "$SLACK_APP_TOKEN" \
--profile opsBoth commands validate that profile names exist in config.toml.
- Caller selects a profile (schedule/channel/API caller).
- Profile is resolved from
config.toml. - Runtime fields are converted to
RunOverrides. - Server merges
RunOverrideswithAppStatedefaults to build per-runRunConfig.
This keeps server runtime stateless while allowing per-run behavior.
- Channel inline overrides are still supported:
channels.<type>.modelchannels.<type>.auto_approve
- If both
profileand inline values are set, profile-based run overrides take precedence. - Gateway emits deprecation warnings to help migration.
Profile validation enforces:
max_turnsin1..=256system_promptup to32KB(characters)
Invalid profile values fail at profile resolution time.
- Move channel inline
modelandauto_approveinto named profiles inconfig.toml. - Set
profile = "..."on channels and schedules. - Use
stakpak autopilot doctorto detect deprecated inline channel fields. - Keep
autopilot.tomlfocused on runtime wiring only.