Nudge doorbells that land in the input line without submitting #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-mail-doorbell-stall"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The symptom
A spawned lunacycle agent sat idle with its doorbell visible in the input line but never submitted:
Meanwhile everything reported healthy —
event-bus statushealthy,list-pendingempty, message 84 intact in the DB. Delivery had "succeeded" as far as mail was concerned. The agent looked idle for no reason and the mail went unread.Why it was invisible
_deliver_onefired and forgot:A swallowed Enter was indistinguishable from a delivered doorbell. Nothing logged, nothing retried.
The fix
Capture the recipient's status before prompting. If it was not working and is still not working ~2s later, the submit didn't take — send one
enterto flush the buffer.Placed in
_deliver_onebecause every doorbell routes through it — spawn kickoffs and ordinary mail alike.Verification
Both primitives tested against a live agent:
pane send-text(no Enter)idle— reproduces the reported state exactlypane send-keys enterdoneNUDGE-OKAlso
agent_status()returnsNonecleanly for a nonexistent pane.Honest limitation
The original stall did not reproduce on demand. I tried zero-delay prompting immediately after
agent start(submitted cleanly,PONG) and the exact 156-char emoji/quoted doorbell string (submitted cleanly,READ-OK). So this fixes the failure class — a prompt that lands without submitting — rather than a confirmed mechanism.That's deliberately why it's a cheap idempotent nudge rather than a redesign: it costs one status read per delivery to a non-busy recipient, and it can't make anything worse. If stalls persist after this, the next step is logging
agent promptfailures to~/.herdr-mail/so there's evidence to work from instead of a screenshot.Docs updated in
herdr-mail/README.md(v1 limits) andskill/SKILL.md(manual flush:herdr pane send-keys <pane> enter, plus a reminder that the message is durable andmail inboxshows it regardless).🤖 Generated with Claude Code
forgejo-admin referenced this pull request2026-07-31 20:07:42 +00:00
spawn reap#4