Skip to content

400 Error When Listing Tasks #2

Open

Description

@LostLaplace

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.

Activity

  1. added a commit that references this issue on Jan 5, 2026
    bab90f1
  2. hangryscribe3 commented on Mar 18, 2026

    @hangryscribe3

    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').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions