hermes-s6-container-supervision

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

Updated May 28, 2026
One-click install
npx skills add https://github.com/patty-chow/the-stable --skill hermes-s6-container-supervision-patty-chow
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hermes-s6-container-supervision
Source: https://github.com/patty-chow/the-stable/tree/main/skills/software-development/hermes-s6-container-supervision
Command: npx skills add https://github.com/patty-chow/the-stable --skill hermes-s6-container-supervision-patty-chow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the Hermes Agent Docker image requires understanding its s6-overlay supervision tree, and common tasks like adding static services, debugging per-profile gateways, or explaining container exit codes are blocked by non-obvious s6-overlay v3 mechanics. ## Core Features & Use Cases - Service Management Guidance: Step-by-step recipes for adding new static s6-rc.d services, registering per-profile gateways, and bringing services up or down with s6-svc. - Gateway Debugging: Diagnose crash loops, missing service slots after container restart, and profile reconciliation failures using s6-svstat and container-boot.log. - Architecture Reference: Explains the Architecture B pattern where the CMD (main-wrapper.sh) is the main program rather than an s6-supervised service, including why exit code 143 occurs. - Use Case: A developer adds a new supervised service to the Hermes Docker image by creating the s6-rc.d directory structure, wiring dependencies, and verifying it with the docker test harness. ## Quick Start Ask the agent to explain why a per-profile gateway is not starting in the Hermes Docker container and how to inspect it with s6-svstat.

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 static 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, and the Dockerfile COPY picks it up automatically.

How do I debug a Docker container service that keeps restarting?▼

Run docker exec with the absolute path /command/s6-svstat /run/service/<name> to see its state. A down status with an exitcode and 'want up' means s6 keeps restarting a crashing process; check the service logs and configuration to find the cause.

Why does docker exec say s6-svstat command not found?▼

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

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

Exit code 143 occurs because /run/s6/basedir/bin/halt does not propagate the exit code written to the container results file, so shutdown always reports SIGTERM. To get a real exit code, let the CMD program exit normally instead of calling halt from a finish script.

Why is my supervised service directory missing after docker restart?▼

Service directories under /run/service live on tmpfs and are wiped on container restart. They are recreated by the cont-init.d reconciler at boot; if a slot is missing, check docker logs for the 02-reconcile-profiles script output.