Repository navigation
Description
Queue rank 48/48 · Difficulty 5/5 · Status on main: not_fixed
NVBug: https://nvbugspro.nvidia.com/bug/6765179 · NVBug priority: Unprioritized · ARB: Ananth Subramaniam
GitHub: none found (NVIDIA-NeMo/Gym PR/issue search returned nothing; defect lives in deepagents + langgraph upstream)
Summary
The NeMo Fabric DeepAgents adapter runs on a filesystem-only FilesystemBackend. DeepAgents correctly hides execute from model-facing tools, but it stays registered in the LangGraph ToolNode. When the model calls an unknown tool, ToolNode builds its "try one of [...]" recovery message from all registered tools, so it advertises execute, which then fails with an unsupported-backend error. Misleading recovery guidance, not the initial bash_command hallucination.
Reproduction
Deterministic, no model/network (run in the fabric-deepagents venv):
import tempfile
from deepagents.middleware.filesystem import FilesystemMiddleware, supports_execution
from deepagents.backends import FilesystemBackend
from langgraph.prebuilt import ToolNode
d = tempfile.mkdtemp()
mw = FilesystemMiddleware(backend=FilesystemBackend(root_dir=d, virtual_mode=True))
ToolNode(mw.tools)._validate_tool_call({'name':'bash_command','args':{},'id':'x','type':'tool_call'})
Reply lists ..., execute; supports_execution is False. E2E: ./run.sh test nemo_fabric_deepagents_math.
Root cause
ToolNode recovery (langgraph prebuilt/tool_node.py:1268-1278, reporter-observed line numbers) enumerates self.tools_by_name.keys(), unaware of DeepAgents' per-request capability filter (deepagents/middleware/filesystem.py:1893-1902,1961-1970) that drops execute for a non-SandboxBackendProtocol backend built at nemo_fabric_adapters/deepagents/adapter.py:218-231. Registration and recovery disagree.
Status on main (not_fixed)
Defect primitives (supports_execution, SandboxBackendProtocol, "is not a valid tool") are absent from Gym source — only in third-party packages. responses_api_agents/nemo_fabric_agent/requirements.txt still pins nemo-fabric[...,deepagents,...]==0.2.0 (last touched by d85ae79, tokenizers only). No Gym commit since bug rev 1f47874 touches this path; no upstream fix pulled in.
Proposed fix
Upstream-owned. In langgraph ToolNode (or the deepagents middleware), derive the invalid-tool suggestion list from the effective capability-filtered toolset, or have deepagents omit execute from ToolNode registration when supports_execution(backend) is False — keeping the runtime guard. Then bump the nemo-fabric/deepagents pin in requirements.txt and re-validate. No clean Gym-only source fix exists. Do not enable local shell as a workaround.
Validation
Add the deterministic diagnostic above as an upstream unit test (assert reply excludes execute). In QA, after the version bump, re-run testcases/environments/nemo_fabric_deepagents_math.py (all 5 rows) and confirm the task-3 checkpoint no longer shows the execute recovery suggestion. Record timeout outcome honestly; the report does not claim the fix removes the 1800s timeout.
Triage
Difficulty 5/5 — upstream defect spanning deepagents + langgraph with ambiguous ownership, unfixable in Gym source and needing maintainer agreement, though repro is deterministic and the change is small. Effort ~12 h. Needs GPU/model: no (deterministic repro; E2E re-run uses hosted inference). External dependency: deepagents + langgraph via nemo-fabric 0.2.0.
Reviewer notes
Verifier confirmed not_fixed (high confidence) and raised difficulty 4→5: the rubric lists "upstream defect" at 5, ownership is split across two external projects (langgraph + deepagents), and a Gym QA engineer has no Gym-ownable patch. Corrections applied: the repro snippet now defines d = tempfile.mkdtemp(); upstream line numbers and "deepagents 0.6.12" are framed as reporter-observed/version-drifting; the LangGraph version was not recorded in the bug.
Activity