fix(docker): install python-is-python3 so bare python resolves in containers#33226
Merged
Conversation
…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.
Contributor
🔎 Lint report:
|
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drop a
/usr/bin/python → python3symlink into the Docker image so barepythonworks.Root cause
Debian 13 ships only
python3— nopythonsymlink. When the agent emits bash commands using barepython(which models do frequently from their training prior), every such call fails inside the container with:The agent then retries with different approaches, sessions take longer, and
agent.logfills with WARNING noise.Changes
Dockerfile: addpython-is-python3to the apt install line on the supervisor stage.python-is-python3is the standard Debian package that drops a/usr/bin/python → python3symlink. Roughly 30 KB. Zero behavior change for anything that already callspython3directly; transparent fix for everything else.Validation
which pythoninside container/usr/bin/pythonpython --versioncommand not found(127)Python 3.13.xpythoncc @benbarclay
Fixes #33178