Skip to content

fix(docker): install python-is-python3 so bare python resolves in containers#33226

Merged
benbarclay merged 1 commit into
mainfrom
hermes/hermes-aba0966b
May 28, 2026
Merged

fix(docker): install python-is-python3 so bare python resolves in containers#33226
benbarclay merged 1 commit into
mainfrom
hermes/hermes-aba0966b

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Drop a /usr/bin/python → python3 symlink into the Docker image so bare python works.

Root cause

Debian 13 ships only python3 — no python symlink. When the agent emits bash commands using bare python (which models do frequently from their training prior), every such call fails inside the container with:

/usr/bin/bash: python: command not found
Tool terminal returned error … exit_code 127

The agent then retries with different approaches, sessions take longer, and agent.log fills with WARNING noise.

Changes

  • Dockerfile: add python-is-python3 to the apt install line on the supervisor stage.

python-is-python3 is the standard Debian package that drops a /usr/bin/python → python3 symlink. Roughly 30 KB. Zero behavior change for anything that already calls python3 directly; transparent fix for everything else.

Validation

Before After
which python inside container not found /usr/bin/python
python --version command not found (127) Python 3.13.x
Agent terminal calls using bare python exit 127, retry loop run normally

cc @benbarclay

Fixes #33178

…ontainers

Debian 13 ships only `python3` — there's no `/usr/bin/python` symlink. When
the agent emits bash commands using bare `python` (which models do frequently
from their training prior), every such call fails with:

    /usr/bin/bash: python: command not found
    Tool terminal returned error … exit_code 127

The agent then retries with different approaches, sessions take longer, and
agent.log fills with WARNING noise.

`python-is-python3` is the standard Debian package that drops a
`/usr/bin/python → python3` symlink. ~30 KB, zero behavior change for
anything calling `python3` directly; transparent fix for everything else.

Fixes #33178.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-aba0966b vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9494 on HEAD, 9494 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5013 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/docker Docker image, Compose, packaging labels May 27, 2026
@benbarclay benbarclay merged commit 71b4a6b into main May 28, 2026
25 checks passed
@benbarclay benbarclay deleted the hermes/hermes-aba0966b branch May 28, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Setup]: python: command not found when agent runs terminal tools

3 participants