Skip to content

Add restriction against accessing installed package versions#687

Merged
juanmichelini merged 1 commit intomainfrom
juan/commit0-anti-cheating
Apr 22, 2026
Merged

Add restriction against accessing installed package versions#687
juanmichelini merged 1 commit intomainfrom
juan/commit0-anti-cheating

Conversation

@juanmichelini
Copy link
Copy Markdown
Collaborator

Summary

This PR adds a restriction to prevent agents from accessing the installed version of the target package, closing the cheating loophole discovered in the jinja benchmark run.

Problem

In the jinja benchmark, the agent tried to copy the installed jinja2 from site-packages to study the reference implementation:

cp -r /agent-server/.venv/lib/python3.13/site-packages/jinja2 /tmp/jinja2_ref/

The current prompt only warned against pip installing, but did not prohibit accessing the already-installed version.

Change

Added a new paragraph after the existing anti-cheating restrictions:

Do NOT access, copy, import from, or use the installed version of the target package
(e.g., in site-packages, .venv, dist-packages, pip cache, etc.). Only use the code
provided in the /testbed/ directory. The installed version may contain code that
you are supposed to implement yourself.

This is general enough to cover any Python package, not just jinja.

Testing

The detect_cheating.py script in https://github.com/All-Hands-AI/research/pull/35 can be used to verify that future benchmark runs do not exhibit this pattern.

Prevent agents from accessing, copying, or importing from the installed
version of the target package (e.g., site-packages, .venv). This closes
the cheating loophole where agents could study the reference implementation
instead of implementing from scratch.
Copy link
Copy Markdown
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Good taste — Simple, pragmatic fix to a real problem.

[RISK ASSESSMENT]
[Overall PR] ⚠️ Risk Assessment: 🟢 LOW

This is a prompt text change that closes a documented cheating loophole. Limited blast radius (single template file), no code logic changes, and the behavioral impact (preventing access to installed packages) is the intended purpose.

VERDICT:
Worth merging

KEY INSIGHT:
Pragmatic solution that directly addresses observed cheating behavior with clear, comprehensive restrictions.

@juanmichelini
Copy link
Copy Markdown
Collaborator Author

@juanmichelini
Copy link
Copy Markdown
Collaborator Author

@VascoSch92 checked and it seems clean

Bottom line
 The 9 resolved-instance score is not inflated by copying from installed packages or the internet. The only concerning
 signal is a thought-block in the un-submitted jinja run where the agent considered using the installed reference but
 appears not to have followed through.
https://allhandsai.slack.com/archives/D0ACALLK493/p1776839343773609?thread_ts=1776839248.217739&cid=D0ACALLK493

@juanmichelini juanmichelini merged commit e74d99f into main Apr 22, 2026
3 checks passed
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.

3 participants