You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an HTTP 400 error for many of the CLI features when I try to use them with the latest tasknotes HTTP API. A simple tn list produces:
Error: HTTP 400: {"success":false,"error":"For filtering tasks, please use POST /api/tasks/query which supports advanced filtering capabilities. GET /api/tasks is for basic listing only. See API documentation for details."}
This is from the latest commit for tasknotes-cli and v4.2.1 of the tasknotes plugin.
Reacted by Imri Paran, hangryscribe3 and Daniele Dente
I hit this same issue and found a fix (via Claude, so apologies if this is wrong in some way. The fix did work for me though.). There are actually two bugs:
Bug 1: The 400 error — in commands/list.js, the basic listing path always appends completed=false as a query param to GET /api/tasks, even with plain tn list. Fixed by replacing that entire block to route through api.queryTasks() / POST /api/tasks/query instead.
Bug 2: Crash after fixing bug 1 — once tasks start returning, it crashes with task.priority.toUpperCase is not a function on any task with a null priority. Fixed in lib/utils.js by changing task.priority.toUpperCase() to (task.priority ? String(task.priority).toUpperCase() : 'NONE').
Activity
fix: API compatibility with latest TaskNotes plugin (fixes callumalpa…
hangryscribe3 commentedon Mar 18, 2026
I hit this same issue and found a fix (via Claude, so apologies if this is wrong in some way. The fix did work for me though.). There are actually two bugs:
Bug 1: The 400 error — in commands/list.js, the basic listing path always appends completed=false as a query param to GET /api/tasks, even with plain tn list. Fixed by replacing that entire block to route through api.queryTasks() / POST /api/tasks/query instead.
Bug 2: Crash after fixing bug 1 — once tasks start returning, it crashes with task.priority.toUpperCase is not a function on any task with a null priority. Fixed in lib/utils.js by changing task.priority.toUpperCase() to (task.priority ? String(task.priority).toUpperCase() : 'NONE').