Bound stalled DeepAgents sessions and cleanup - #2897
Open
miguelg719 wants to merge 13 commits into
Open
Conversation
|
…idation-07-deepagents-lifecycle
…idation-07-deepagents-lifecycle
Contributor
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…idation-07-deepagents-lifecycle
…idation-07-deepagents-lifecycle
…idation-07-deepagents-lifecycle
…idation-07-deepagents-lifecycle
akeimach
approved these changes
Sep 9, 2026
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.
Bounds stalled DeepAgents setup, stream waits and cleanup. Timeout settings reject invalid values, preserve the original stop reason and finish cleanup without losing a completed tool-result batch.
MCP setup, stream and cleanup timeouts preserve AnyIO task ownership; real in-memory MCP sessions cover the cancel-scope regression and cleanup deadlines.
Validation: 35 Python runner tests; 29 Python tests and Python compilation passed, including stalled MCP acquisition/tool discovery, competing wall/inactivity deadlines, invalid timeout inputs, and cleanup.
Stack position: 7/17. Base:
evals/consolidation-06-frame-support. Each PR contains the change relative to its immediate predecessor.Reviewer entry points:
packages/integrations/deepagents/runner/run_eval.pypackages/integrations/deepagents/runner/tests/test_run_eval.pyReadiness: local validation is described above; GitHub CI and automated review feedback are pending. This PR is open as non-draft so automated reviewers can run.
Follow-up review validation: 40 Python tests pass. Timeout attribution now distinguishes the runner’s expired deadline from inner MCP/provider
TimeoutError, preserves subsecond diagnostic values, and records the selected watchdog before cancellation cleanup. Same-task MCP/AnyIO ownership is preserved. The alleged early-expiry arithmetic was not confirmed; a separate slow-cleanup attribution regression is covered.