Fixing “No agents connected” in the .NET MAUI DevFlow Inspector
The Inspector said no agents were connected, yet maui devflow agent status reached his app without trouble. James Montemagno explains that both can be true, because they use different connections. The agent lives in your app and runs its own HTTP server, while the broker is a background daemon that keeps the registry the CLI and Inspector use to find agents. The CLI can talk to an agent directly, but maui devflow list returned [] because the app never made it into the broker’s registry.
His fix was to restart the broker with IPv6 disabled, using DOTNET_SYSTEM_NET_DISABLEIPV6=1, after which the app registered without a restart. The diagnosis is a handy technique in itself. He queried the broker’s /api/agents endpoint over IPv4 and IPv6 with different Host headers, and the same broker returned a 404 for one combination and a 200 for the others. He’s careful to call it a workaround and his own reading of the cause, and he filed it as dotnet/maui-labs#851.
The post also covers the two adb tunnels for Android emulators, with reverse for the broker port and forward for the agent port, a shell function that scopes the variable to the maui command in zsh and PowerShell, and a seven-step startup checklist. If you hit the same problem, he asks you to add your details to the issue.