Skip to content

[Bug]: Runtime filesystem/shell tools injected without make_tool_awaitable #583

Description

@sami-marreed

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

  1. Enable filesystem tools (enable_filesystem_tools).
  2. 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

  • I searched existing issues and this doesn’t look like a duplicate

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcomplexity: lowSmall, focused change — easy to reviewcomponent: agentCore agent loop, DynamicAgentGraph, LLM node, tool execution, CugaLiteneeds-triageNewly filed, not yet reviewedpriority: highImportant, address soon

Type

No type

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions