Skip to content

fix(agent): make agent list --all and --type filter as documented - #4302

Merged
ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix/agent-list-all-and-type
Oct 20, 2026
Merged

ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix/agent-list-all-and-type

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Problem

Two ruflo agent list flags don't do what their help text says:

  • agent list --all ("Include inactive agents") prints No agents found matching criteria even when agents exist. The command sends status: 'all' to agent_list, and the tool treats any status as a literal filter (a.status === 'all'), so every agent is filtered out.
  • agent list --type coder lists every agent type. The command sends agentType, but agent_list only reads status, domain and includeTerminated, so the filter is dropped. The tool's own description says to "Filter by status/domain/agentType if needed".

Repro: ruflo agent spawn -t coder, ruflo agent spawn -t tester, then ruflo agent list --all (empty) and ruflo agent list --type tester (shows the coder too).

Fix

  • agent list --all now sends includeTerminated: true, which is how agent_list already includes terminated agents. --status is still passed through unchanged.
  • agent_list accepts an optional agentType (added to the input schema, checked with validateIdentifier like status and domain) and filters on it. It is also echoed in filters.

Tests

New __tests__/agent-list-filters.test.ts spawns a coder, a tester and a terminated coder in a temp workspace. It checks agent_list({ agentType }), and runs the real agent list action with no flags, --all, --type, and --type --all. 3 of the 4 tests fail on main and all pass with this change.

I also ran agent-provider-model-propagation, agent-registry-concurrency-r50, mcp-tools-deep, commands, commands-deep and agent-logs-hive-resolution. The only failures are the two Memory Commands tests in commands.test.ts, and they fail the same way on main in my partial local install. tsc --noEmit reports nothing for the changed files.

This touches the agent_list handler next to #4301 but not the same lines, so the two merge independently.

This change was prepared with AI assistance; I reviewed the diff and ran the tests above locally.

@kevin9327
kevin9327 requested a review from ruvnet as a code owner October 20, 2026 00:34
@ruvnet
ruvnet merged commit 0dfaafe into ruvnet:main Oct 20, 2026
111 checks passed
@ruvnet ruvnet mentioned this pull request Oct 20, 2026
5 tasks done
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