Repository navigation
fix(agent): make agent list --all and --type filter as documented - #4302
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two
ruflo agent listflags don't do what their help text says:agent list --all("Include inactive agents") printsNo agents found matching criteriaeven when agents exist. The command sendsstatus: 'all'toagent_list, and the tool treats anystatusas a literal filter (a.status === 'all'), so every agent is filtered out.agent list --type coderlists every agent type. The command sendsagentType, butagent_listonly readsstatus,domainandincludeTerminated, 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, thenruflo agent list --all(empty) andruflo agent list --type tester(shows the coder too).Fix
agent list --allnow sendsincludeTerminated: true, which is howagent_listalready includes terminated agents.--statusis still passed through unchanged.agent_listaccepts an optionalagentType(added to the input schema, checked withvalidateIdentifierlikestatusanddomain) and filters on it. It is also echoed infilters.Tests
New
__tests__/agent-list-filters.test.tsspawns a coder, a tester and a terminated coder in a temp workspace. It checksagent_list({ agentType }), and runs the realagent listaction with no flags,--all,--type, and--type --all. 3 of the 4 tests fail onmainand all pass with this change.I also ran
agent-provider-model-propagation,agent-registry-concurrency-r50,mcp-tools-deep,commands,commands-deepandagent-logs-hive-resolution. The only failures are the twoMemory Commandstests incommands.test.ts, and they fail the same way onmainin my partial local install.tsc --noEmitreports nothing for the changed files.This touches the
agent_listhandler 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.