From 6ff67a57d72317360cacd4b41560395ded117d20 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 15 Mar 2026 03:39:49 +0000 Subject: feat: fix task failures via sandbox improvements and display commits in Web UI - Fix ephemeral sandbox deletion issue by passing $CLAUDOMATOR_PROJECT_DIR to agents and using it for subtask project_dir. - Implement sandbox autocommit in teardown to prevent task failures from uncommitted work. - Track git commits created during executions and persist them in the DB. - Display git commits and changestats badges in the Web UI execution history. - Add badge counts to Web UI tabs for Interrupted, Ready, and Running states. - Improve scripts/next-task to handle QUEUED tasks and configurable DB path. --- internal/executor/gemini.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/executor/gemini.go') diff --git a/internal/executor/gemini.go b/internal/executor/gemini.go index 2db3218..67ea7dd 100644 --- a/internal/executor/gemini.go +++ b/internal/executor/gemini.go @@ -68,7 +68,7 @@ func (r *GeminiRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi // Gemini CLI doesn't necessarily have the same rate limiting behavior as Claude, // but we'll use a similar execution pattern. - err := r.execOnce(ctx, args, t.Agent.ProjectDir, e) + err := r.execOnce(ctx, args, t.Agent.ProjectDir, t.Agent.ProjectDir, e) if err != nil { return err } @@ -82,11 +82,12 @@ func (r *GeminiRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi return nil } -func (r *GeminiRunner) execOnce(ctx context.Context, args []string, workingDir string, e *storage.Execution) error { +func (r *GeminiRunner) execOnce(ctx context.Context, args []string, workingDir, projectDir string, e *storage.Execution) error { cmd := exec.CommandContext(ctx, r.binaryPath(), args...) cmd.Env = append(os.Environ(), "CLAUDOMATOR_API_URL="+r.APIURL, "CLAUDOMATOR_TASK_ID="+e.TaskID, + "CLAUDOMATOR_PROJECT_DIR="+projectDir, "CLAUDOMATOR_QUESTION_FILE="+filepath.Join(e.ArtifactDir, "question.json"), ) cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} -- cgit v1.2.3