Skip to content

Fix conda activation in SWE-bench prompts: source absolute path#754

Open
VascoSch92 wants to merge 1 commit into
mainfrom
fix/swebench-conda-activation-source
Open

Fix conda activation in SWE-bench prompts: source absolute path#754
VascoSch92 wants to merge 1 commit into
mainfrom
fix/swebench-conda-activation-source

Conversation

@VascoSch92

Copy link
Copy Markdown
Member

What

Fixes the conda-activation line in the swebench and swebenchmultilingual default prompts:

-       ./opt/miniconda3/etc/profile.d/conda.sh ; conda activate testbed
+       source /opt/miniconda3/etc/profile.d/conda.sh ; conda activate testbed

Why

./opt/miniconda3/... is a relative path (resolved against the agent's cwd /workspace/<repo>/, where it does not exist) and it executes the script instead of source-ing it, so it cannot activate testbed in the agent's shell. benchmarks/swefficiency/prompts/default.j2 already uses the correct . /opt/... form; this aligns the other two.

This was harmless while the runtime auto-activated testbed, but under the v1.24.0 agent-server (agent runs as the non-root openhands user, so the base image's /root/.bashrc auto-activation never fires) the shell starts in base conda and this broken line is the only activation path. Weak models copy it verbatim and fail; strong models work around it.

Minimal, prompt-only change. Closes #753. Related: #698.

The activation line used ./opt/miniconda3/... which is a relative path
(resolved against the repo cwd, where it does not exist) and executes the
script instead of sourcing it, so it cannot activate testbed in the agent's
shell. Use 'source /opt/miniconda3/...' as the swefficiency prompt already does.
@VascoSch92 VascoSch92 requested a review from juanmichelini June 22, 2026 13:43
@juanmichelini

Copy link
Copy Markdown
Collaborator

@VascoSch92 thank you! do you have eval monitor links where this was tested?

@VascoSch92

Copy link
Copy Markdown
Member Author

@juanmichelini https://openhands-eval-monitor.vercel.app/?run=swebench%2Flitellm_proxy-anthropic-claude-sonnet-4-6%2F28005569773%2F&days=15

Logs are clean: no ModuleNotFoundError, no sklearn import failures, no conda errors anywhere in logs.

But perhaps you can double-check just to be sure.

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.

SWE-bench prompt: malformed conda-activation is now fatal under v1.24.0 (testbed no longer auto-activated)

2 participants