From 6ac15be438e3692cbc2ae2f36ab2d69468fc6372 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 14 Mar 2026 00:33:46 +0000 Subject: fix: cancel blocked tasks + auto-complete completion reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes for BLOCKED task issues: 1. Allow BLOCKED → CANCELLED state transition so users can cancel tasks stuck waiting for input. Adds Cancel button to BLOCKED task cards in the UI alongside the question/answer controls. 2. Detect when agents write completion reports to $CLAUDOMATOR_QUESTION_FILE instead of real questions. If the question JSON has no options and no "?" in the text, treat it as a summary (stored on the execution) and fall through to normal completion + sandbox teardown rather than blocking. Also tightened the preamble to make the distinction explicit. Co-Authored-By: Claude Sonnet 4.6 --- internal/task/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/task/task.go') diff --git a/internal/task/task.go b/internal/task/task.go index 2c57922..69da5f3 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -118,7 +118,7 @@ var validTransitions = map[State]map[State]bool{ StateTimedOut: {StateQueued: true}, // retry or resume StateCancelled: {StateQueued: true}, // restart StateBudgetExceeded: {StateQueued: true}, // retry - StateBlocked: {StateQueued: true, StateReady: true}, + StateBlocked: {StateQueued: true, StateReady: true, StateCancelled: true}, } // ValidTransition returns true if moving from the current state to next is allowed. -- cgit v1.2.3