Summary
After an app crash, agent status continued to list the dead instance's agent (same ID and port) while diagnose simultaneously reported broker_running: false and agent_count: 0 — contradictory state that implied a healthy agent that was actually gone.
Environment
- Host OS/platform: macOS 26.5.1 (arm64)
- AI tool/host: GitHub Copilot CLI
- Model: Claude Opus 4.8
- MAUI CLI:
maui devflow 0.1.0-preview.11.26317.2 (CLI commands, not MCP)
- App framework(s): .NET MAUI 11.0.0, Blazor Hybrid (WebView)
- Target platform(s): macOS AppKit (
net11.0-macos) via community Platform.Maui.MacOS 0.3.0 + Platform.Maui.MacOS.BlazorWebView 0.3.0
- .NET SDK: 11.0.100-preview.5
- MAUI DevFlow package versions:
Microsoft.Maui.DevFlow.Agent 0.25.0-dev, Microsoft.Maui.DevFlow.Blazor 0.25.0-dev; agent runtime 0.25.0-dev
What happened
The app crashed (an unrelated app-side exception). Afterward the broker and agent views disagreed about whether an agent was connected.
Attempts and workarounds
agent status listed the crashed instance's agent on its port, with the same agent ID it had before the crash.
diagnose reported broker_running: false and agent_count: 0.
wait returned a different, unrelated agent.
broker start plus a direct --agent-host 127.0.0.1 --agent-port <port> connection to the relaunched agent restored a working connection.
Expected behavior
Crashed/disconnected agents should be evicted from broker registration promptly, and agent status and diagnose should report consistent broker/agent state.
Actual behavior
A stale registration persisted and the two commands disagreed, making it unclear whether the agent was alive.
Outcome
Worked around (broker restart + direct port connection).
Scope
Single current session verifying a macOS AppKit feature in a .NET MAUI Blazor Hybrid app.
Summary
After an app crash,
agent statuscontinued to list the dead instance's agent (same ID and port) whilediagnosesimultaneously reportedbroker_running: falseandagent_count: 0— contradictory state that implied a healthy agent that was actually gone.Environment
maui devflow0.1.0-preview.11.26317.2 (CLI commands, not MCP)net11.0-macos) via communityPlatform.Maui.MacOS0.3.0 +Platform.Maui.MacOS.BlazorWebView0.3.0Microsoft.Maui.DevFlow.Agent0.25.0-dev,Microsoft.Maui.DevFlow.Blazor0.25.0-dev; agent runtime 0.25.0-devWhat happened
The app crashed (an unrelated app-side exception). Afterward the broker and agent views disagreed about whether an agent was connected.
Attempts and workarounds
agent statuslisted the crashed instance's agent on its port, with the same agent ID it had before the crash.diagnosereportedbroker_running: falseandagent_count: 0.waitreturned a different, unrelated agent.broker startplus a direct--agent-host 127.0.0.1 --agent-port <port>connection to the relaunched agent restored a working connection.Expected behavior
Crashed/disconnected agents should be evicted from broker registration promptly, and
agent statusanddiagnoseshould report consistent broker/agent state.Actual behavior
A stale registration persisted and the two commands disagreed, making it unclear whether the agent was alive.
Outcome
Worked around (broker restart + direct port connection).
Scope
Single current session verifying a macOS AppKit feature in a .NET MAUI Blazor Hybrid app.