Bound stalled DeepAgents sessions and cleanup
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: 5/11. 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.py
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.
Reordered stack: #2891 → #2892 → #2895 → #2896 → #2897 → #2898 → #2899 → #2900 → #2901 → #2893 → #2894.
Readiness: CI passed on d1d6e48fd9. Review threads are triaged and resolved.