Skip to content

fix: status command uses granular error handling per MCP service (#984)#1591

Open
ousamabenyounes wants to merge 1 commit intoruvnet:mainfrom
ousamabenyounes:fix/issue-984
Open

fix: status command uses granular error handling per MCP service (#984)#1591
ousamabenyounes wants to merge 1 commit intoruvnet:mainfrom
ousamabenyounes:fix/issue-984

Conversation

@ousamabenyounes
Copy link
Copy Markdown

Summary

Fixes #984

  • getSystemStatus() had a monolithic try-catch wrapping all 4 MCP calls — if any single call failed (e.g. swarm_status on a fresh install), the entire status showed [STOPPED]
  • Now each MCP service (swarm, mcp, memory, tasks) is queried independently with its own try-catch
  • Status shows running: true if any service responds, instead of requiring all to succeed
  • Failed services show sensible defaults (0 entries, not running) without hiding other services

Verification

  • Post-fix tests: no regressions
  • New tests: 8 added, all pass
  • Source-level verification: 4 independent try-catch blocks, no monolithic error handler

Files changed

File Change
v3/@claude-flow/cli/src/commands/status.ts Replace monolithic try-catch with per-service error handling
v3/@claude-flow/cli/__tests__/status-granular-errors.test.ts NEW: 8 regression tests for #984

Generated by Claude Code
Vibe coded by ousamabenyounes

…net#984)

One failing MCP call (swarm_status, memory_stats, or task_summary) caused
the entire status to show STOPPED. Now each service is queried independently
with its own try-catch, and running is true if any service responds.

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Bug: claude-flow status shows STOPPED even when daemon is running

1 participant