diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-11 08:25:23 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-11 08:25:23 +0000 |
| commit | 889791e9a2d9585a35e72402bfc9e6feb49fbb88 (patch) | |
| tree | 1f9c4ecdb71906e81c4511ca1b3c1ae428581a44 /internal/storage/db.go | |
| parent | 1b5e7177769c79f9e836a55f9c008a295e2ff975 (diff) | |
fix: clear question_json when restarting a task via ResetTaskForRetry
A BLOCKED task that fails on resume would keep its stale question_json
after being restarted. The frontend then showed "waiting for your input"
with the old prompt even though the task was running fresh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/storage/db.go')
| -rw-r--r-- | internal/storage/db.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/storage/db.go b/internal/storage/db.go index 5ba0786..aaf1e09 100644 --- a/internal/storage/db.go +++ b/internal/storage/db.go @@ -237,7 +237,7 @@ func (s *DB) ResetTaskForRetry(id string) (*task.Task, error) { configJSON, _ := json.Marshal(t.Agent) now := time.Now().UTC() - if _, err := tx.Exec(`UPDATE tasks SET state = ?, config_json = ?, updated_at = ? WHERE id = ?`, + if _, err := tx.Exec(`UPDATE tasks SET state = ?, config_json = ?, question_json = NULL, updated_at = ? WHERE id = ?`, string(task.StateQueued), string(configJSON), now, id); err != nil { return nil, err } |
