Conversation
willccbb
approved these changes
Dec 21, 2025
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.
Description
Fixes for
PythonEnv:pythontool: Before, the timeout would be caught inbashbut because the error string would not be JSON-parseable, it would error with JSONDecodeError inpython. Now, it correctly handles this edge case, and shows the model that the previous command has timed outExamples
Fix 1: Command timeouts
Patch the
pythontool by adding to L230-231 to simulate a model response that generates a timeoutNow, the timeout correctly catches and shows an informative error to the model
uv run vf-eval math-python -n1 -r1 -v -a '{"sandbox_timeout_per_command_seconds": 5}'Fix 2: Python worker dead
Patch the worker script tool by adding to L115 to simulate the worker dying after the first tool call
Now, the crash is detected and raised as custom
PythonWorkerDeaderrorType of Change
Testing
uv run pytestlocally.Checklist
Additional Notes
Note
Detects dead Python worker and robustly parses timeouts/non-JSON outputs, adds pip package availability to the system prompt, and exposes sandbox client max workers.
verifiers/envs/python_env.py):PythonWorkerDeadErrorand PID tracking (_WORKER_PID_FILE), writing PID on start and checking liveness before requests._CHECK_WORKER_READY_SCRIPT; improve readiness logging.{ "status": "error" }instead of raisingJSONDecodeError.verifiers/envs/sandbox_env.py):before_sleeplog level fromERRORtoWARNING.environments/math_python/math_python.py):sandbox_client_max_workersand pass through toPythonEnv.Written by Cursor Bugbot for commit 5605493. This will update automatically on new commits. Configure here.