fix: make swarm_status return actual agent counts from agent store#1064
Open
sbhavani wants to merge 1 commit intoruvnet:mainfrom
Open
fix: make swarm_status return actual agent counts from agent store#1064sbhavani wants to merge 1 commit intoruvnet:mainfrom
sbhavani wants to merge 1 commit intoruvnet:mainfrom
Conversation
Previously swarm_status returned hardcoded zeros for agent counts. Now it reads from .claude-flow/agents/store.json to return real counts. Co-Authored-By: claude-flow <ruv@ruv.net>
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.
Summary
Previously
swarm_statusreturned hardcoded zeros for agent counts, making it useless for monitoring swarm state.This fix reads from
.claude-flow/agents/store.json(the same persistence layer used byagent_spawn) to return actual agent counts.Changes
loadSwarmAgents()function that reads agent store JSONswarm_statushandler to return real counts: total, active, idle, busy, terminatedBefore
{ "swarmId": "...", "status": "running", "agentCount": 0, "taskCount": 0 }After
{ "swarmId": "default", "status": "running", "agentCount": 1, "agents": { "total": 1, "active": 1, "idle": 1, "busy": 0, "terminated": 0 }, "topology": "hierarchical-mesh" }🤖 Generated with claude-flow