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