Skip to content

[Cursor Agent] "task must be a non-empty string" error when query contains spaces or certain phrases #577

@moyunzero

Description

@moyunzero

Describe the bug

When running CodeGraph Context in Cursor Agent mode, I receive the following error:

Error: task must be a non-empty string

Query used:

{
  "query": "blog implementation posts articles content"
}

Steps to Reproduce:

  1. Open Cursor in Agent mode
  2. Trigger CodeGraph Context
  3. Use a query containing multiple words / spaces
  4. The error appears

Expected behavior
CodeGraph should successfully return relevant context instead of throwing this error.

Environment:

  • Cursor version: Version: 3.6.25
  • CodeGraph: Latest (integrated in Cursor)

Additional context
It seems the task parameter is becoming empty or invalid after processing the query string (possibly due to trimming or parsing issues).

Screenshots:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions