hermes-s6-container-supervision

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the Hermes Agent Docker image's s6-overlay supervision tree is error-prone: per-profile gateways fail to start or survive restarts, cont-init.d boot scripts behave unexpectedly, and the Architecture B CMD pattern (main-wrapper.sh) is non-obvious. This Skill provides the architecture map, key file locations, recipes, and pitfalls needed to modify, debug, or extend the container's service supervision. ## Core Features & Use Cases - Service management recipes: Add new static s6-rc.d services, bring profile gateways up/down with s6-svc, and inspect service state with s6-svstat. - Boot reconciliation guidance: Understand how cont-init.d scripts (UID remap, volume seeding, profile reconciliation) restore gateway slots from the persistent volume on every boot. - Pitfall diagnosis: Resolve common failures such as 'command not found' via docker exec, root-owned profile directories, crash-looping gateways, and containers exiting 143. - Use Case: A per-profile gateway keeps restarting after docker restart. Use this Skill to check /run/service/gateway-<name> with /command/s6-svstat, read container-boot.log, and determine whether the reconciler skipped the profile due to a missing SOUL.md. ## Quick Start Ask the AI to explain why a per-profile gateway in the Hermes Docker container is not starting and how to inspect its s6 supervision state.

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

How do I check why a per-profile gateway is not starting in the Hermes container?▼

Run 'docker exec <c> /command/s6-svstat /run/service/gateway-<name>' using the absolute path, since /command is not on the docker exec PATH. A 'down (exitcode N)' status means the process is crash-looping, often because the profile has no model or auth configured.

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, such as services and cont-init.d scripts. Always use the absolute path /command/s6-svstat when running commands 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 the desired exit code. To get a real exit code, let the CMD (main-wrapper.sh) exit normally rather than controlling exit from a finish script.

Why did the boot reconciler skip one of my profiles?▼

The reconciler uses the presence of SOUL.md as the marker for a real profile and intentionally skips directories without one, such as stray folders or partial restores. Add a SOUL.md file, even an empty one, to opt the profile back into reconciliation.

Can the main Hermes program run as an s6-supervised service instead of the CMD?▼

No, because cont-init.d scripts receive no CMD arguments and s6 halt does not propagate exit codes, so the image uses the Architecture B pattern where /init execs main-wrapper.sh as the CMD. The main program's exit code then becomes the container exit code, matching the pre-s6 tini behavior.