GLOBTIMEOUT does not bound wall-clock time — tool blocks until the runaway glob finishes…
- User
GLOB_TIMEOUTdoes not bound wall-clock time — tool blocks until the runaway glob finishesSubmission checklist
- This is a bug, not a usage question.
- I added a clear and descriptive title.
- I searched existing issues and didn't find this.
- I can reproduce this with the latest released version.
- I included a minimal reproducible example and steps to reproduce.
Area (Required)
- deepagents (SDK)
- cli
- code
- talon
- acp
- evals
- harbor
- daytona
- modal
- quickjs
- runloop
- langsmith-sandbox
- Other / not sure / general
Related Issues / PRs
No response
Reproduction Steps / Example Code (Python)
python - Assistant
Now let me look at the existing tests for this timeout behavior:
- Assistant
Now add the helper next to
GLOB_TIMEOUT: - Assistant
Now strengthen the regression test so it asserts wall-clock time, not just the message:
- Assistant
Repro confirms the fix:
returned after 0.50s(was 3.01s). Now lint and typecheck the changed files: - Assistant
Fixed. The full unit suite passes (1748 passed, 98 skipped, 4 xfailed).
Root cause
In
sync_glob(libs/deepagents/deepagents/middleware/filesystem.py), thereturnof the "timed out" message executed insidewith concurrent.futures.ThreadPoolExecutor(...), whose__exit__callsshutdown(wait=True)— joining the worker thread that's still running the glob. Sofuture.result(timeout=GLOB_TIMEOUT)shaped the message, but the tool still blocked until the runaway glob actually finished.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.