Repository navigation
Description
What happens
The exclusive-hold check exists only in taskboard_move:
src/host/tools.ts:765-770:
// Exclusive hold: while a task is in_progress under a session ...
if (task.status === 'in_progress' && task.claimedBy !== undefined && task.claimedBy !== actor.sessionId) {
throw new ToolError(ERR.forbidden, `task is held by session ${task.claimedBy}; never take over another session's claim`)
}taskboard_delete (src/host/tools.ts:907-927) calls caller(...), checks only for a running
execution record, and then trashes the task and clears the claim:
caller(exec as ToolRunContext)
...
if (task.executions.some(e => e.outcome === 'running')) { throw ... }
next = structuredClone(task)
next.trashedAt = deps.now()
delete next.claimedBy
delete next.claimedAtSo any session — including one in a different project, which taskboard_move rejects with
forbidden/workspace_mismatch — can soft-delete a card that another session claimed through
todo → in_progress (the normal claim-first agent flow, with no execution record). Afterwards the
holder's taskboard_get/taskboard_move fail with not_found, and the card disappears into the
trash. The GUI has no un-trash action (only "purge" for the deleted column), so recovering it means
restoring the ledger/JSON.
The neighboring mutators taskboard_update, taskboard_comment_add and taskboard_checklist also
lack the hold/project gate, but only delete is destructive and irreversible from the board.
Verification
Reproduced with the real registerTaskboardTools + TaskStore and an outsider session
(cwd: /proj/b), task claimed by session A in /proj/a:
taskboard_move→forbidden(correct);taskboard_delete({id, ifVersion})→{"trashed":true};- stored record after the delete:
{ trashedAt: 7000, status: 'in_progress', claimedBy: undefined }.
Environment
- dsh-taskboard
0.9.8/dev@615b435(behaviour unchanged by fix(host): contain background failures and retry execution settlement #80/fix(git): refuse mirror deletion when status is unknown #81; delete handler at
src/host/tools.ts:907-927is untouched) - DSH
0.2.1-rc.5, Windows 11, Node26.13.0
Suggested fix
Copy the move holder guard into delete (and decide explicitly whether update/comment_add/
checklist should stay open or be gated too — right now the rule is implicit). For delete, also
consider requiring the same claim scope as claiming: the caller's project (or a linked root when
allowClaimFromLinkedRoots is on) must own the task. A small regression test mirroring the
existing move-boundary tests would pin it.
Dedupe
#40 is a stale holder blocking reruns, #29 is bulk-delete UI, #62 is linked-root claiming. Nothing
covers deleting another session's held card.
Activity
cloader commentedon Nov 1, 2026
Thanks for the detailed reproduction. This was fixed in #86 using the same exclusive-hold rule as
taskboard_move, and is included in v0.9.8.in_progressand claimed by another session,taskboard_deletereturnsforbidden. This applies to other sessions in both the same project and a different project; the task and its claim remain intact.running, deletion remains blocked for every session, including the holder, until that execution is cancelled or settles.moveanddeleteshare the same guard, which runs inside the ledger write lock against the latest task record, so a stale cached holder cannot bypass the check.Validation: typecheck and full build passed. After syncing with the updated
devbranch, all 662 tests in 50 files passed, and GitHub CI passed on Node 22.x and 26.x, including the finalmaincommit. Regression coverage includes same-project and cross-project sessions, holder deletion, version conflicts, running execution protection, and a holder changed on disk behind a stale store. An initial parallel test run hit a scheduler lifecycle timeout; that file passed independently, and the full suite passed with reduced concurrency.