From fb0e4b44393bae3c54f099bea87dfea19854d058 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 13 Mar 2026 05:24:20 +0000 Subject: fix: enable Gemini file writing by passing --yolo and -p flags GeminiRunner.buildArgs was missing --yolo (auto-approve all tools) so the gemini CLI only registered 3 tools (read_file, write_todos, cli_help) and write_file was not available. Agents that needed to create files silently failed (exit 0, no files written). Also switch instructions from bare positional arg to -p flag, which is required for non-interactive headless mode. Update preamble tests to match file-based summary approach (CLAUDOMATOR_SUMMARY_FILE) kept from the merge conflict resolution. Co-Authored-By: Claude Sonnet 4.6 --- internal/executor/gemini.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/executor/gemini.go') diff --git a/internal/executor/gemini.go b/internal/executor/gemini.go index 956d8b5..c30cd66 100644 --- a/internal/executor/gemini.go +++ b/internal/executor/gemini.go @@ -169,8 +169,9 @@ func (r *GeminiRunner) buildArgs(t *task.Task, e *storage.Execution, questionFil } args := []string{ - instructions, + "-p", instructions, "--output-format", "stream-json", + "--yolo", // auto-approve all tools (equivalent to Claude's bypassPermissions) } // Note: Gemini CLI flags might differ from Claude CLI. -- cgit v1.2.3