Skip to content

Conversation

@Mortimerp9
Copy link
Contributor

currently, the coding env doesn't reset properly, so you can do:

env.step(CodeAction(code="def foobar():\n    return 'Hello from function'\n"))
env.reset()
env.step( CodeAction(code="print(foobar())"))

This is not correct, foobar should be removed when the env is reset.

solution: create a new PyExecutor on reset. Also reset the transform, just for good measures.

test: uv run pytest tests/envs/test_python_codeact_reset.py -v

side effect: smolagent actually requires 3.10 and it's a dependency in the pyproject, so we need to up the base python we have in the pyproject. (maybe each env should have its list of reqs in its own docker)

@Mortimerp9 Mortimerp9 requested a review from pankit-eng October 21, 2025 20:03
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 21, 2025
@pankit-eng pankit-eng merged commit 5eb0e22 into main Oct 21, 2025
1 check passed
rycerzes pushed a commit to rycerzes/OpenEnv that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants