Skip to content

agentd: raise Finite Chat bridge readiness deadline 30s → 180s - #571

Merged
futurepaul merged 1 commit into
mainfrom
agentd-bridge-ready-timeout
Aug 18, 2026
Merged

agentd: raise Finite Chat bridge readiness deadline 30s → 180s#571
futurepaul merged 1 commit into
mainfrom
agentd-bridge-ready-timeout

Conversation

@futurepaul

Copy link
Copy Markdown
Contributor

What

Raises the hard-coded agentd → Finite Chat bridge readiness deadline from 30s to 180s (finite-agentd/src/daemon.rs).

Why

The bridge's cold start reprocesses retained room history before it serves, so time-to-ready scales with data size and host I/O, not process spawn speed. On 2026-08-18 a production agent with a ~15k-message room needed ~55s to become ready on lat3 (measured twice, same image + store copy, fresh kata VM). Against the 30s deadline that agent boot-looped deterministically for ~3h: agentd killed the bridge mid-startup on every attempt, Core-recorded restarts reported success, and the agent never came back.

A warm (already-at-head) store still took ~54s, so this is fixed per-boot cost proportional to history — every hosted agent drifts toward the cliff as its rooms grow. Fleet census today: 1/29 unhealthy on lat3 (this agent), 0/22 on lat1.

Why 180s and not fixing the startup cost here

The deadline raise un-breaks large rooms now; the startup-cost root cause is a separate follow-up (postmortem in the org Brain). A genuinely dead bridge still fails within 3 minutes and is retried.

Test

cargo test -p finite-agentd (31 passed), cargo clippy -p finite-agentd -- -D warnings clean.

Bridge cold start reprocesses retained room history before serving, so
time-to-ready scales with data size, not spawn speed. On 2026-08-18 an
agent with a ~15k-message room needed ~55s to become ready on lat3 and
boot-looped forever: agentd killed the bridge at the 30s deadline on
every start, and operator restarts reproduced the loop deterministically.

180s gives large rooms headroom on slow hosts; a genuinely dead bridge
still fails and is retried within minutes. Root-causing the startup cost
itself is tracked separately.
@futurepaul
futurepaul force-pushed the agentd-bridge-ready-timeout branch from 0be373c to 51fd99a Compare August 18, 2026 21:27
@futurepaul
futurepaul merged commit 5a5c441 into main Aug 18, 2026
14 checks passed
@futurepaul
futurepaul deleted the agentd-bridge-ready-timeout branch August 18, 2026 21:47
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.

1 participant