Files
crewAI/lib/crewai/tests
Devin AI 660a186375 feat: enforce fail-closed defaults for unsafe tool execution
Fixes #4593

- Add  field to BaseTool with documentation
- Propagate  flag through CrewStructuredTool and @tool decorator
- Enforce fail-closed behavior in all tool execution paths:
  - crew_agent_executor.py (native tool calling path)
  - experimental/agent_executor.py (experimental executor path)
  - tool_utils.py (ReAct text-based path, sync and async)
- Unsafe tools require a before_tool_call hook returning True to execute
- Deterministic error message for denied unsafe tool execution
- Add 15 regression tests covering allow/deny paths

Co-Authored-By: João <joao@crewai.com>
2026-02-25 19:40:15 +00:00
..
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2026-02-13 21:34:37 -03:00
2026-02-13 21:34:37 -03:00
2025-10-20 14:10:19 -07:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-12-05 13:23:26 -05:00
2025-10-20 14:10:19 -07:00
2026-02-13 21:34:37 -03:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00