Skip to content

[codex] Install procps in Docker image#7032

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
HiddenPuppy:codex/add-procps-to-docker-image
Apr 11, 2026
Merged

[codex] Install procps in Docker image#7032
teknium1 merged 1 commit into
NousResearch:mainfrom
HiddenPuppy:codex/add-procps-to-docker-image

Conversation

@HiddenPuppy

Copy link
Copy Markdown
Contributor

Summary

  • install procps in the Docker image so ps is available in container runs
  • restore hermes gateway status, hermes cron status, and hermes cron list in the packaged image

Root Cause

The Debian-based Docker image did not include procps, but the CLI's gateway/cron status flow calls find_gateway_pids(), which shells out to ps aux on non-Windows platforms. Inside the container image that meant the status commands could not inspect running gateway processes correctly.

Validation

  • source /Users/jerome.xu/Desktop/codex/hermes-agent/.codex-runtime/venv311/bin/activate && pytest -n 0 tests/hermes_cli/test_update_gateway_restart.py
  • Docker image build could not be run in this environment because docker is not installed locally.

Fixes #7020.

@huacao59109

Copy link
Copy Markdown

Confirmed in a real Docker Compose deployment.

Environment

  • Deployment: Docker Compose
  • Image: nousresearch/hermes-agent:latest
  • Hermes version: 0.8.0
  • Python version: 3.13.5
  • Gateway platform: Feishu
  • Container model: hermes gateway run as the main container process (PID 1)

What I observed

The gateway is actually running and connected, and Feishu messaging works normally, but:

hermes gateway status

still reports:

✗ Gateway is not running

Evidence that the gateway is actually running

Inside the container:

  • /opt/data/gateway.pid exists and points to PID 1
  • /opt/data/gateway_state.json shows:
    • gateway_state = "running"
    • platforms.feishu.state = "connected"
  • /proc/1/cmdline shows:
    • /usr/bin/python3 /usr/local/bin/hermes gateway run

So the runtime state is correct; only the CLI status detection is wrong.

Root cause

In the packaged image I tested, ps is missing. find_gateway_pids() relies on:

ps aux

When ps is unavailable, hermes gateway status incorrectly concludes that the gateway is not running.

Notes

This is especially confusing because the messaging side is healthy (Feishu DM works), so the CLI output is misleading.

Installing procps in the Docker image should fix the packaged-image case.

A more robust long-term fix would also be to add a fallback to PID-file and /proc/<pid>/cmdline based detection when ps is unavailable.

@teknium1 teknium1 marked this pull request as ready for review April 11, 2026 08:22
@teknium1 teknium1 merged commit 3065e69 into NousResearch:main Apr 11, 2026
Tommyeds pushed a commit to Tommyeds/hermes-agent that referenced this pull request Apr 12, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
liaoyinglong pushed a commit to liaoyinglong/hermes-agent that referenced this pull request Apr 13, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
Adds procps to apt-get install in Dockerfile, enabling ps/pgrep/pkill inside the container. Contributed by @HiddenPuppy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Debian package procps is missing in the Docker image

3 participants