You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security (high):
- Fix misleading docs/translations that said "only through MCP tools"
— now correctly documents api_get/api_post direct API access
- Add explicit warning on _saved_tools about shared state in
multi-user modes
Code quality (medium):
- Make max invocations configurable: CODE_MODE_MAX_INVOCATIONS setting
(was hardcoded _MAX_CALL_TOOL_INVOCATIONS = 100)
- Combine isinstance checks for basic types
- Narrow except Exception to json.JSONDecodeError in api_get/api_post
- Rename kwargs to post_kwargs in _api_post to avoid shadowing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: homeassistant-addon/DOCS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ Requires add-on restart to take effect.
229
229
230
230
**Default:**`false`
231
231
232
-
Enables the `ha_manage_custom_tool` — a sandboxed "escape hatch" that lets AI agents write and run custom Python code when no existing tool covers the request. Code runs in pydantic-monty, a Rust-based sandbox with no filesystem or network access. The only way to interact with Home Assistant is through registered MCP tools via `call_tool()`.
232
+
Enables the `ha_manage_custom_tool` — a sandboxed "escape hatch" that lets AI agents write and run custom Python code when no existing tool covers the request. Code runs in pydantic-monty, a Rust-based sandbox with no filesystem or network access. Sandbox code can access the HA REST API directly via `api_get()`/`api_post()`, or call existing MCP tools via `call_tool()`.
233
233
234
234
**Safety guardrails:**
235
235
- Code runs in a sandboxed interpreter (no filesystem, no network, no third-party imports)
0 commit comments