implementation

JAM-40 task lifecycle hardening implementation

2026-04-09

JAM-40 task lifecycle hardening implementation

Findings summary

Root cause was not one bug. It was a stack of conflicting write paths:

  1. UI status moves used full-array writes. Board moves and arrow moves rewrote the entire tasks.json list through PUT /api/tasks, so a status change had no canonical server-side lifecycle path.
  2. No lifecycle gate existed server-side. Any client that could write the full list could jump a task to any status, regardless of the intended workflow.
  3. No read-after-write verification existed before success. A write could be reported as successful without confirming the persisted task state.
  4. Chat guidance still told agents to mutate status by rewriting the full array. That kept the same reliability risk alive outside the UI.
  5. Task capture vocabulary and defaults still carried legacy terms. next and blocked still showed up in capture flows, and new captures defaulted to next, which front-loaded prioritization instead of durable intake.

Implementation shipped

1) Canonical server-side lifecycle transition helper

Implemented in mission-control/lib/tasks-store.ts:

2) Targeted task mutation APIs

Added targeted routes so normal task edits no longer need full-array PUTs:

Notes:

3) UI status changes now use the canonical path

Updated mission-control/components/tasks/TasksWorkspace.tsx:

4) Chat/task operational model hardened

Updated /Users/vinny/.openclaw/workspace/AGENTS.md:

5) Chat move helper added

Added mission-control/scripts/transition-task.mjs:

6) Vocabulary alignment and intake default fix

Updated:

Changes:

This aligns capture with intake instead of implicit prioritization.

Files changed

Workspace guidance / capture

Mission Control code

Validation

Build

Service restart

Live lifecycle validation against localhost

Temporary validation tasks were created, transitioned through the live API, then deleted after validation.

Task A

Task B

Invalid transition guard

Chat move helper validation

Targeted PATCH path validation

Cleanup

Deferred work

Nothing blocking the JAM-40 approval criteria remains.

Non-blocking follow-up if desired:

Shipped vs deferred

Shipped

Deferred

Ready for review

Yes.