Skip to content

fix(cli): make status tasks list tasks instead of always printing "No tasks" - #4321

Merged
ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix-status-tasks-all
Oct 20, 2026
Merged

ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix-status-tasks-all

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Summary

ruflo status tasks always prints "No tasks" (or an empty JSON list), even when tasks exist.

Two things go wrong:

  1. tasksCommand calls task_list with status: 'all', but task_list treats every comma-separated value as a literal status. No task has the status all, so everything is filtered out.
  2. After that, the table rows read t.id and t.agent, but task_list returns taskId and assignedTo (an array), so the ID and Agent columns would be empty even once tasks come back.

Changes

  • mcp-tools/task-tools.ts: in task_list, a status list containing all means "no status filter". Real statuses (pending, completed, pending,in_progress, …) work as before.
  • commands/status.ts: the status tasks table uses taskId and joins assignedTo (shows - when empty).

Tests

New __tests__/status-tasks-all.test.ts (uses a temp CLAUDE_FLOW_CWD):

  • task_list with status: 'all' returns every task
  • task_list with a real status still filters
  • status tasks --format json lists every task
  • the status tasks table shows the task id and the assigned agents

Without the fix, 3 of the 4 tests fail; with it all 4 pass. The other task-related suites in __tests__ give the same results as on main (the only failure, hooks-post-task-graph-edge-2961, also fails on main here because it spawns the built CLI).

This change was prepared with AI assistance; I reviewed the diff and verified it by running the tests above.

@ruvnet

ruvnet commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Reviewed the diff: `status: 'all'` was being passed straight into the comma-split status filter (so it literally compared each task's status against the string `"all"`, matching nothing), and the `status tasks` command was reading `t.id`/`t.agent` while `task_list` actually returns `taskId`/`assignedTo` — both bugs explain "No tasks" exactly as described. The fix (treat `'all'` as "skip the filter" in `task-tools.ts`, fix the field names in `status.ts`) is minimal and correctly scoped; the 4 new tests cover the 'all' bypass, that a real status filter still works, and the field mapping end-to-end through the actual `status tasks` command action. CI is fully green (108/108, 0 failures). Merging.

@ruvnet
ruvnet merged commit 0b936e7 into ruvnet:main Oct 20, 2026
111 checks passed
@ruvnet ruvnet mentioned this pull request Oct 20, 2026
meefs pushed a commit to meefs/claude-code-flow that referenced this pull request Oct 20, 2026
Minor release (new backward-compatible flags: Grok Build CLI host
surface ruvnet#3512, memory list/search tag filter ruvnet#3526) bundled with a
round of correctness fixes merged since 3.58.1: memory delete-sync
(ruvnet#4138), real AgentDB HNSWIndex replacing the dead getController('hnsw')
path with safe exact-search fallback (ruvnet#4249/ruvnet#4322), harness live-process
reporting (ruvnet#3521), RaBitQ on-demand index build (ruvnet#4318/ruvnet#4319),
metaharness ADR-152 cost-dimension and verdict-band fix (ruvnet#3520), swarm
idle-agent heartbeat false-positive (ruvnet#4320), ephemeral-agent termination
idempotency (ruvnet#4323), status/task_list field-mapping and total-count
fixes (ruvnet#4321/ruvnet#4324).

Also fixes the actual cause of broken images/links on
npmjs.com/package/ruflo: `ruflo/package.json`'s `repository.directory:
"ruflo"` field added an extra path layer on top of the README content
(the root README.md, copied in verbatim by `prepublishOnly` at publish
time, which is already written with repo-root-relative paths) — every
relative image/link resolved to e.g. `raw/main/ruflo/ruflo/assets/...`
instead of `raw/main/ruflo/assets/...`. Removed the `directory` field to
match claude-flow's own (directory-less) repository entry. A prior PR
(ruvnet#4325) fixed `ruflo/README.md`'s own relative paths for anyone browsing
that file directly on GitHub, but that file is overwritten by the root
README at publish time and was never the actual npm-rendered content.

Published to npm: @claude-flow/[email protected], [email protected],
[email protected], and standalone @claude-flow/[email protected] (the ruvnet#4249 fix —
not part of the 3-package train, published separately per its own
leaf's npm presence). All three umbrella packages' latest/alpha/v3alpha
dist-tags verified pointing at 3.59.0.

Co-Authored-By: RuFlo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants