Context
cu task search and cu export implement workspace-wide task retrieval as an unbounded N+1 crawl: enumerate workspace → spaces → folders → lists, then call GetTasks per list and match client-side. Under the 100 req/min rate limiter this is slow for any real workspace, and because only page 0 is fetched per list, results are silently incomplete for lists with more than ~100 tasks.
Evidence
internal/cmd/task.go:534-579 — search walks GetSpaces → GetFolders → GetLists → GetTasks(ctx, list.ID, &api.TaskQueryOptions{}) per list with no pagination (page 0 only) and filters client-side.
internal/cmd/export.go:112-123 — same crawl, and it swallows errors: folders, _ := client.GetFolders(ctx, space.ID) and lists, _ := client.GetLists(ctx, folder.ID), so an export can silently omit whole subtrees.
- The ClickUp API rate limit (100 req/min) makes the per-list fan-out both slow and quota-hungry.
Suggested fix
Adopt the server-side endpoint GET /team/{team_id}/task (Get Filtered Team Tasks), which supports workspace-scoped filtering and pagination, and page through results until exhaustion. In export.go, stop discarding GetFolders/GetLists errors — at minimum surface them as warnings so exports are not silently partial.
Context
cu task searchandcu exportimplement workspace-wide task retrieval as an unbounded N+1 crawl: enumerate workspace → spaces → folders → lists, then callGetTasksper list and match client-side. Under the 100 req/min rate limiter this is slow for any real workspace, and because only page 0 is fetched per list, results are silently incomplete for lists with more than ~100 tasks.Evidence
internal/cmd/task.go:534-579— search walksGetSpaces→GetFolders→GetLists→GetTasks(ctx, list.ID, &api.TaskQueryOptions{})per list with no pagination (page 0 only) and filters client-side.internal/cmd/export.go:112-123— same crawl, and it swallows errors:folders, _ := client.GetFolders(ctx, space.ID)andlists, _ := client.GetLists(ctx, folder.ID), so an export can silently omit whole subtrees.Suggested fix
Adopt the server-side endpoint
GET /team/{team_id}/task(Get Filtered Team Tasks), which supports workspace-scoped filtering and pagination, and page through results until exhaustion. Inexport.go, stop discardingGetFolders/GetListserrors — at minimum surface them as warnings so exports are not silently partial.