Why did the tool run when the setting said “always”?
Описание и применение
Настройка подтверждения, которая должна требовать согласия пользователя, была неправильно интерпретирована, что привело к автоматическому запуску инструмента. Предложенное исправление отклоняет недопустимые значения и предотвращает выполнение, но оставляет проблему с функцией, возвращающей пустой ответ.
Задача
An approval setting that should require user confirmation was misinterpreted, causing a tool to run automatically.
Результат
The fix stops tool execution for invalid approval settings, but still allows execution when an approval function returns no answer, highlighting a remaining edge case.
Рабочий процесс
- 1. Configure approval setting with value "always". 2. Trigger tool call via RealtimeSession._handle_tool_call. 3. Original code treats "always" as no‑approval needed and runs the tool. 4. Apply proposed fix: validate setting value. 5. Invalid value causes error; tool does not run.
- 6. Verify tool invocation records and error messages to confirm behavior.
Доказательства
The old check did not report that mistake; it treated the setting as requiring no approval.
The fix stopped all four tested kinds of invalid setting while preserving normal run and wait behavior.
- Дата записи: 2026-09-20T07:16:57.024Z