hermes-s6-container-supervision

Modify and debug the s6-overlay supervision tree inside the Hermes Agent Docker image.

1|Updated Jun 19, 2026
One-click install
npx skills add https://github.com/Lento47/arcana-community --skill hermes-s6-container-supervision-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hermes-s6-container-supervision
Source: https://github.com/Lento47/arcana-community/tree/main/skills/devops/hermes-s6-container-supervision
Command: npx skills add https://github.com/Lento47/arcana-community --skill hermes-s6-container-supervision-lento47

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the Hermes Agent Docker image requires understanding its s6-overlay v3 supervision architecture — static services, per-profile gateway slots, cont-init.d boot scripts, and the Architecture B CMD pattern — which is non-obvious and easy to break without guidance. ## Core Features & Use Cases - Service management guidance: Add new static s6-rc.d services (like the dashboard) with correct type, run script, dependencies, and user-bundle wiring. - Gateway debugging: Diagnose per-profile gateway failures using s6-svstat, s6-svc, and the container-boot.log reconciler output. - Architecture reference: Explains why the container CMD is main-wrapper.sh (Architecture B), how leading-dash args reach the user program, and why containers exit 143 under halt. - Use Case: A developer adds a new supervised service to the Hermes image, then debugs why a profile gateway crash-loops after docker restart by inspecting /run/service slots and reconciler logs. ## Quick Start Ask the agent to explain how per-profile gateways are supervised in the Hermes Docker container and help debug why the gateway for profile 'coder' keeps restarting.

Frequently Asked Questions about hermes-s6-container-supervision

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new supervised service to an s6-overlay Docker image?▼

Create a directory under docker/s6-rc.d/<name> with a type file containing 'longrun' and a run script using #!/command/with-contenv sh. Add empty dependencies.d/base and user/contents.d/<name> files so it joins the user bundle; the Dockerfile COPY picks it up automatically.

How do I debug a service that keeps restarting under s6 supervision?▼

Run /command/s6-svstat /run/service/<name> inside the container; 'down (exitcode N), want up' means s6 wants it running but the process keeps exiting. Check the service logs and fix the underlying configuration — s6 will keep retrying until it stays up.

Why does docker exec fail with 'command not found' for s6-svstat?▼

The /command directory containing s6-overlay binaries is only on PATH for processes spawned by the supervision tree, not for docker exec sessions. Always use the absolute path, e.g. /command/s6-svstat, when running s6 tools via docker exec.

Why does my s6-overlay container always exit with code 143?▼

Invoking s6-svscanctl -t or /run/s6/basedir/bin/halt triggers stage 3 shutdown but returns 143 (SIGTERM) instead of your intended exit code. To propagate a real exit code, let the container's CMD exit normally rather than calling halt from a finish script.

How do per-profile services survive a docker restart with s6?▼

Service directories live on tmpfs and are wiped on restart, so a cont-init.d reconciler script must recreate them from persistent state on each boot. In this image, 02-reconcile-profiles walks profile gateway_state.json files and re-registers slots, auto-starting only those previously running.