diff --git a/agent/deep_assistant.py b/agent/deep_assistant.py index 957b0d0..1cf54ad 100644 --- a/agent/deep_assistant.py +++ b/agent/deep_assistant.py @@ -478,13 +478,19 @@ def create_custom_cli_agent( backend = FilesystemBackend(root_dir=workspace_root, virtual_mode=False) # Set up composite backend with routing based on the new implementation + # NOTE: virtual_mode=True anchors all paths to root_dir. This is required for + # these offload-only backends: CompositeBackend strips the route prefix and + # forwards "/" to grep, so virtual_mode=False would resolve "/" to the real + # filesystem root and scan the whole disk (hitting /usr, /var, other sessions' + # temp dirs), causing 45-152s grep calls. virtual_mode=True confines grep to + # the temp dir and filters out-of-root results. large_results_backend = FilesystemBackend( root_dir=tempfile.mkdtemp(prefix="deepagents_large_results_"), - virtual_mode=False, + virtual_mode=True, ) conversation_history_backend = FilesystemBackend( root_dir=tempfile.mkdtemp(prefix="deepagents_conversation_history_"), - virtual_mode=False, + virtual_mode=True, ) composite_backend = CompositeBackend( default=backend,