crewAIInc/crewAI · error · ValueError
action='info' requires 'path'
Error message
action='info' requires 'path'
What it means
For action='info' DaytonaFileTool._run needs a 'path' to fetch metadata for via self._info(sandbox, path). A missing path raises ValueError before any SDK call, so the error never reflects a sandbox-side problem. The info result (size, mode, timestamps) is only assembled after validation succeeds.
Source
Thrown at lib/crewai-tools/src/crewai_tools/tools/daytona_sandbox_tool/daytona_file_tool.py:284
return self._append(sandbox, path, content or "", binary=binary)
if action == "list":
if path is None:
raise ValueError("action='list' requires 'path'")
return self._list(sandbox, path)
if action == "delete":
if path is None:
raise ValueError("action='delete' requires 'path'")
sandbox.fs.delete_file(path, recursive=recursive)
return {"status": "deleted", "path": path}
if action == "mkdir":
if path is None:
raise ValueError("action='mkdir' requires 'path'")
mkdir_mode = mode or "0755"
sandbox.fs.create_folder(path, mkdir_mode)
return {"status": "created", "path": path, "mode": mkdir_mode}
if action == "info":
if path is None:
raise ValueError("action='info' requires 'path'")
return self._info(sandbox, path)
if action == "exists":
if path is None:
raise ValueError("action='exists' requires 'path'")
return self._exists(sandbox, path)
if action == "move":
if path is None or destination is None:
raise ValueError("action='move' requires 'path' and 'destination'")
sandbox.fs.move_files(path, destination)
return {"status": "moved", "from": path, "to": destination}
if action == "find":
if path is None or pattern is None:
raise ValueError("action='find' requires 'path' and 'pattern'")
return self._find(sandbox, path, pattern)
if action == "search":
if path is None or pattern is None:
raise ValueError("action='search' requires 'path' and 'pattern'")
return self._search(sandbox, path, pattern)View on GitHub (pinned to 754d7323be)
Solutions
- Include the target: _run(action='info', path='/workspace/report.pdf').
- Validate the kwargs against the tool schema before calling.
- If chaining operations in an agent, require the path in every step of the plan, not just the first.
Example fix
# before info = file_tool._run(action='info') # after info = file_tool._run(action='info', path='/workspace/report.pdf')
Defensive patterns
Strategy: validation
Validate before calling
def safe_info(file_tool, path: str | None):
if not path:
raise ValueError("action='info' requires 'path'")
return file_tool._run(action='info', path=path) Try / catch
try:
info = file_tool._run(action='info', path=path)
except ValueError:
# path was None — re-ask the caller for the target
path = request_path_from_user_or_agent() Prevention
- Make path a required positional parameter of your own wrapper functions.
- Log the full kwargs on failure so the missing key is obvious.
- Never assume the tool remembers paths across calls — it is stateless.
When it happens
Trigger: Calling _run(action='info') with path omitted or explicitly None; agents that pass only the action verb; using 'file' or 'target' as the kwarg instead of 'path'.
Common situations: Agent-generated calls that assume the tool remembers a previously used path (the tool is stateless per call); exploratory calls while testing the tool with minimal arguments.
Related errors
- action='delete' requires 'path'
- action='mkdir' requires 'path'
- action='exists' requires 'path'
- action='move' requires 'path' and 'destination'
- action='find' requires 'path' and 'pattern'
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/d5198b228c711e69.
Report an issue: GitHub.