What happened
Runtime filesystem/shell tools from build_runtime_tools are registered as raw function references. Unlike MCP/registry tools (which go through make_tool_awaitable in prepare_node), these callables are injected with a plain dict.update, so awaiting them in the sandbox can fail.
Validated on origin/main @ 2538f1c2.
How to reproduce
- Enable filesystem tools (
enable_filesystem_tools).
- Have the agent execute:
await read_file("notes.txt")
Injection path:
# runtime_tools.py
bundle.execution_callables[ft.name] = fn # raw coroutine/func
# prepare_node.py
adapter._tools_context.update(_runtime_bundle.execution_callables) # no wrap
Expected: same wrapping as other tools — make_tool_awaitable(...) (and ideally tracked_tool for trajectory parity).
Actual: raw callables only for filesystem/shell; await-related failures while MCP tools work with the same await tool(...) pattern.
Environment
- OS: n/a (code-path bug)
- CUGA:
origin/main @ 2538f1c2
- Component: CugaLite runtime tools / prepare_node
Logs, screenshots, or config
src/cuga/backend/cuga_graph/nodes/cuga_agent_core/tools/runtime_tools.py
src/cuga/backend/cuga_graph/nodes/cuga_lite/adapter/prepare_node.py (adapter._tools_context.update(_runtime_bundle.execution_callables))
Checklist
What happened
Runtime filesystem/shell tools from
build_runtime_toolsare registered as raw function references. Unlike MCP/registry tools (which go throughmake_tool_awaitableinprepare_node), these callables are injected with a plaindict.update, so awaiting them in the sandbox can fail.Validated on
origin/main@2538f1c2.How to reproduce
enable_filesystem_tools).Injection path:
Expected: same wrapping as other tools —
make_tool_awaitable(...)(and ideallytracked_toolfor trajectory parity).Actual: raw callables only for filesystem/shell; await-related failures while MCP tools work with the same
await tool(...)pattern.Environment
origin/main@2538f1c2Logs, screenshots, or config
src/cuga/backend/cuga_graph/nodes/cuga_agent_core/tools/runtime_tools.pysrc/cuga/backend/cuga_graph/nodes/cuga_lite/adapter/prepare_node.py(adapter._tools_context.update(_runtime_bundle.execution_callables))Checklist