π Fix: agent evaluation execution in the runtime sandbox - #3799
Merged
Conversation
cj2026-bit
requested review from
Dallas98,
WMC001 and
jeffwu-1999
as code owners
August 28, 2026 06:02
Codecov Reportβ Patch coverage is π’ Thoughts on this report? Let us know! |
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.
Fix Agent Evaluation Execution in the Runtime Sandbox
Bug Fixed
When the sandbox is enabled, Agent Evaluation runs could fail with
Run Agent Error, produce no result, or remain blocked by stale locks.The evaluation task was started directly in the Config process. However, the
runtime workspace, Agent run manager, and sandbox-related resources are owned
by the Runtime process.
Root Cause
There were three problems:
Runtime.
prepare_agent_run.conversation_id=0, so concurrent cases couldshare the same run-manager lock key.
Retries could also start the same evaluation more than once because the run
status was not claimed atomically.
Solution
Config-to-Runtime Dispatch
Config now sends an internal request to Runtime:
The request is authenticated with the internal runtime JWT.
Config remains responsible for creating and preparing the evaluation task.
Runtime is responsible for executing the Agent and scoring the cases.
Runtime-Side Execution
Runtime now:
Per-Case Run Isolation
Each evaluation case now receives a stable, evaluation-specific conversation ID.
This prevents different cases from sharing the same Agent run-manager lock.
The Agent run is also unregistered in a finally block so that locks and
runtime state are cleaned up after both successful and failed executions.
Main Changes
proxy errors, and run cleanup.
Validation
The service starts in Docker and enables sandbox verification for agent evaluation
