diff --git a/hive-ag3nt/src/bin/hive-ag3nt.rs b/hive-ag3nt/src/bin/hive-ag3nt.rs index 7e8b352a..22e196cb 100644 --- a/hive-ag3nt/src/bin/hive-ag3nt.rs +++ b/hive-ag3nt/src/bin/hive-ag3nt.rs @@ -95,6 +95,16 @@ async fn main() -> Result<()> { )); match initial { LoginState::Online => { + // #682: clear any stale `hyperhive-needs-login` + // sentinel from a prior boot that parked in + // `wait_for_login`. Without this the + // dashboard's `needs_login` chip would survive a + // healthy re-spawn since the `Online` branch goes + // straight into `serve()` and `emit_status("online")` + // — the only callsite that removes the sentinel — is + // never invoked on this path. Idempotent: when no + // sentinel exists the inner `remove_file` is a no-op. + bus.emit_status("online"); serve( &cli.socket, Duration::from_millis(poll_ms), diff --git a/hive-ag3nt/src/bin/hive-m1nd.rs b/hive-ag3nt/src/bin/hive-m1nd.rs index c9e5e154..ab3bba64 100644 --- a/hive-ag3nt/src/bin/hive-m1nd.rs +++ b/hive-ag3nt/src/bin/hive-m1nd.rs @@ -85,6 +85,15 @@ async fn main() -> Result<()> { tokio::spawn(hive_ag3nt::forge_notify::run(cli.socket.clone(), true)); match initial { LoginState::Online => { + // #682: clear any stale `hyperhive-needs-login` + // sentinel from a prior boot that parked in + // `wait_for_login`. Same bug as the sub-agent + // binary — without this the dashboard's + // `needs_login` chip survives a healthy re-spawn + // because the `Online` branch never invokes + // `emit_status("online")`. Mirror of the fix in + // `hive-ag3nt.rs`. Idempotent. + bus.emit_status("online"); serve( &cli.socket, Duration::from_millis(poll_ms),