fix(brain): drop --approval-mode yolo from Gemini CLI search

yolo auto-approves every tool call, so a real-time search query could in
principle trigger write/shell tools. Default approval mode still auto-runs the
CLI's read-only web search in headless mode but never silently approves
destructive tools. Verified end-to-end: a grounded query returns a current
answer in ~23s with the account OAuth login. Test asserts yolo is absent;
specs and docs/llm_contexts.md updated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-06-11 00:58:46 +09:00
parent b88def6756
commit f54e2a46ae
5 changed files with 14 additions and 5 deletions

View File

@@ -89,3 +89,7 @@ def test_api_key_stripped_from_child_env(monkeypatch):
assert captured["env"].get("GOOGLE_GENAI_USE_GCA") == "true"
# invoked headless with JSON output
assert "-p" in captured["cmd"] and "-o" in captured["cmd"] and "json" in captured["cmd"]
# never auto-approve all tools: a search query must not be able to trigger
# write/shell tool execution.
assert "yolo" not in captured["cmd"]
assert "--yolo" not in captured["cmd"]