Skip to content

Commit 15c7b4c

Browse files
fix: keep task state and final replies consistent
1 parent 5a6b973 commit 15c7b4c

4 files changed

Lines changed: 328 additions & 96 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ The migration creates a `.v1-backup` copy and writes the v2 database under `~/.k
395395

396396
Tasks persist across process restarts and use `pending`, `running`, `succeeded`, `failed`, `blocked`, and `cancelled` states. `TaskDone` is only a completion request; a successful tool result, test, file check, or explicit confirmation must provide evidence before a task can succeed. API-created tasks with an explicit safe `action` and string `args` are picked up by the durable worker after server restart; failed or blocked tasks require an explicit resume request.
397397

398+
For model-generated complex work, give each `TaskList` item a stable `id` when the same turn can be retried; that ID is preferred over the description and is scoped to the authenticated user, workspace, and session. A `TaskList` update never clears recovered progress. `done` remains readable for old records but new progress and completion summaries use `succeeded`. `Plan`, `TaskList`, `TaskDone`, `Thought`, and `Action` are control blocks: the chat surface uses them internally and returns the latest natural-language response (or a deterministic tool/evidence summary), never a stale `Action` block.
399+
398400
```bash
399401
curl -X POST http://127.0.0.1:8000/api/v2/tasks \
400402
-H 'Content-Type: application/json' \

0 commit comments

Comments
 (0)