Install tree in the Docker image so the agent sees its project structure - #6
Open
KTanmay1 wants to merge 1 commit into
Open
Install tree in the Docker image so the agent sees its project structure#6KTanmay1 wants to merge 1 commit into
KTanmay1 wants to merge 1 commit into
Conversation
`ReactTranslationAgent.get_project_tree` (RepoTransAgent/run.py:246)
shells out to `tree`, but docker/Dockerfile never installs it.
The failure is silent. `subprocess.run(["tree", ...])` raises
FileNotFoundError before returning, so the `find` fallback below the
`returncode == 0` check is unreachable, and the outer handler turns it
into a string that is fed to the model as the observation:
Error getting project structure: [Errno 2] No such file or directory: 'tree'
This appears in every turn of every run. It matters more than a log line:
get_project_tree is the only channel telling the agent which files
currently exist, and slide_window_conversation (generator.py:72) keeps
only the previous turn, so that listing is the agent's working record of
its own progress.
Confirmed across two full 20-iteration runs (C -> Python, Python -> TS);
`grep -c tree docker/Dockerfile` returns 0 on main.
This changes what the agent sees, and therefore scores.
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.
Problem
ReactTranslationAgent.get_project_tree(RepoTransAgent/run.py:246) shells out totree:but
docker/Dockerfilenever installs it —grep -c tree docker/Dockerfilereturns0onmain.The failure is silent.
subprocess.runraisesFileNotFoundErrorbefore returning, so thefindfallback under thereturncode == 0check is unreachable, and the outer handler converts it to a string that is passed to the model as its observation:Evidence
A 20-iteration C → Python run (
antirez_smaz) on an image built from yourdocker/Dockerfile's Python 3.11 stanza — sameapt-get installlist, Java/.NET/Go/Rust/Node layers omitted as that task never touches them — produces the error string in all 20 turns, with no turn receiving a file listing.As a control, the same agent run against an image that does install
treereceives a real listing in all 20 turns. So the behaviour tracks the missing package and nothing else.Why it matters beyond a log line
get_project_treeis the only channel telling the agent which files currently exist, andslide_window_conversation(generator.py:72) retains only the previous turn — so that listing is effectively the agent's record of its own progress. With it replaced by an error string, the agent re-derives project state from scratch each turn.Fix
Add
treeto the existingapt-get installlist.This changes what the agent sees, and therefore scores. Noting it explicitly for the same reason as #5.