Legacy tasks/cancel reports a store failure as -32602 'task reached a terminal status'
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in src/handlers.ts at handleTasksCancel and read how its catch maps taskStore.updateStatus failures. Re-read the task after the failed write and check its status before choosing the response. Done when terminal tasks return -32602, other failures return -32603, and the task is transitioned to cancelled before a success response.
Written by the indexing model from the issue text.
Description
In handleTasksCancel (src/handlers.ts), any exception from taskStore.updateStatus(..., 'cancelled') is mapped to -32602 Cannot cancel task: the task reached a terminal status before it could be cancelled. When the write fails for another reason (a Redis error), the client is told the task is terminal while tasks/get still shows working, and the task goes on to complete.
Spec (2025-11-25 tasks): -32602 is for tasks already in a terminal status; the receiver "MUST transition the task to cancelled before sending the response".
Fix: after the catch, re-read the task and answer -32602 only when it really is terminal; otherwise answer -32603.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 62
- Forks
- 16
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 56
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from platformatic/mcp
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
platformatic/mcp#388 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
platformatic/mcp#387 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
platformatic/mcp#381 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
platformatic/mcp#378 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
platformatic/mcp#373 ·
Maintainers usually reply within 1 day
All issues in platformatic/mcp
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
area:plugins area:security area:skills bug has repro
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anthropics/claude-code#105911 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
dev-five-git/devup-ui#879 ·
Maintainers usually reply within 11 days
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fission-AI/OpenSpec#2165 ·
Maintainers usually reply within 1 day
-
🐞 bug 🧐 unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Tencent/tdesign-vue-next#7032 · 1 comment ·
Maintainers usually reply within 1 day