From 91595726d696ef8bdc8c3ef0a39a1d3a7be34408 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 9 Mar 2026 04:24:06 +0000 Subject: executor: recover stale RUNNING tasks on server startup On restart, any tasks in RUNNING state have no active goroutine. RecoverStaleRunning() marks them FAILED (retryable) and closes their open execution records with an appropriate error message. Called once from serve.go after the pool is created. --- internal/cli/serve.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/cli') diff --git a/internal/cli/serve.go b/internal/cli/serve.go index e90c3e2..4253d56 100644 --- a/internal/cli/serve.go +++ b/internal/cli/serve.go @@ -71,6 +71,7 @@ func serve(addr string) error { if cfg.GeminiBinaryPath != "" { pool.Classifier = &executor.Classifier{GeminiBinaryPath: cfg.GeminiBinaryPath} } + pool.RecoverStaleRunning() srv := api.NewServer(store, pool, logger, cfg.ClaudeBinaryPath, cfg.GeminiBinaryPath) if cfg.WebhookURL != "" { -- cgit v1.2.3