docs: document auth_failed / needs_login-on-401 behavior (follow-up to #423)

This commit is contained in:
lexis 2026-05-25 22:11:45 +02:00 committed by Mara
commit 8d40499e8d
2 changed files with 13 additions and 1 deletions

View file

@ -29,7 +29,15 @@ Each agent harness (`hive-ag3nt serve` or `hive-m1nd serve`) runs:
(`Bus::emit_status("rate_limited")`), sleeps
`HIVE_RATE_LIMIT_SLEEP_SECS` (default 300), then retries.
The dashboard and per-agent page show a `⊘ rate limited` badge
while the harness is parked.
while the harness is parked. **Auth-failed detection** (closes
#419): both stdout and stderr pumps also match
`AUTH_FAIL_MARKERS` (`"authentication_failed"`, `401`, etc.).
On match the harness writes `{state_dir}/hyperhive-needs-login`,
emits `needs_login_idle` status, requeues the inflight message
(so it replays after re-auth), and parks in `wait_for_login`
the same path used at boot. The operator re-authenticates via
the per-agent web UI login flow; on success the sentinel is
cleared and the queued message drives the next turn normally.
7. Emit `LiveEvent::TurnEnd { ok, note }`. Sleep `poll_ms` to avoid
tight loops on transient failures.