summaryrefslogtreecommitdiff
path: root/internal/api/logs.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-06-03 23:44:03 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-06-03 23:44:03 +0000
commitbe84621e0558184399a8d4452be795fdd72928f8 (patch)
tree0fd7e06755bbe83ed65a9784e1c37a42fc6a7a42 /internal/api/logs.go
parentad4fcd22ec6f7408d1efc6a2bb0009c2377f57a6 (diff)
fix: serve log content for executions in READY and BLOCKED states
terminalStates in logs.go only included Completed/Failed/TimedOut/Cancelled/ BudgetExceeded. Executions in READY state (task awaiting user accept/reject) fell through both branches, causing the log viewer to emit an immediate done event with no content — visually an empty log panel. BLOCKED is also added: ask_user suspends execution with the log fully written. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/logs.go')
-rw-r--r--internal/api/logs.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/api/logs.go b/internal/api/logs.go
index 4e63489..4876273 100644
--- a/internal/api/logs.go
+++ b/internal/api/logs.go
@@ -29,6 +29,8 @@ const maxTailDuration = 30 * time.Minute
var terminalStates = map[string]bool{
string(task.StateCompleted): true,
+ string(task.StateReady): true, // execution finished, awaiting user accept/reject
+ string(task.StateBlocked): true, // execution suspended on ask_user
string(task.StateFailed): true,
string(task.StateTimedOut): true,
string(task.StateCancelled): true,