Skip to content

fix(cli): recover content-less wakes instead of silently acking them (#896) - #906

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix/896-no-prompt-recovery
Aug 12, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
fix/896-no-prompt-recovery

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Closes #896 — with a diagnosis that changes what the bug was.

Repro'd live before fixing: stopped a seat's wrapper, queued one well-formed wake and one content-less wake (messageId only), cold-started the wrapper. The well-formed backlog event claimed, spawned, and processed normally — cold start is healthy. The content-less event hit the no-prompt path and was acked no-op, silently. That silent ack is the "boot-backlog swallow": the pilot's seeding produced content-less payloads, and the correlation with wrapper start was coincidental (events were batch-seeded before wrappers started).

Fix, on the #887 rule (between silence and one model turn, spend the turn):

  • messageId but no content → synthesized recovery prompt ("event named message N but carried no content — read the room, decide, NO_REPLY likely"), flowing through the normal claim/cascade enforcement so cost stays bounded.
  • Truly empty → still acked as a deliberate decline, but surfaced via onError with code agent_event_skipped_no_prompt — visible skip instead of a log whisper.

2 new run-loop tests (recovery spawn incl. claim taken; empty-event onError surfacing); mutation-checked (disabling the recovery branch reddens exactly its test); 2 pre-existing exact-shape ack assertions extended with the additive reason field (intent unchanged). Full CLI suite 266 green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8

…— closes the #896 mystery

Repro'd live (2026-08-12): the "boot-backlog swallow" was never a cold-start
bug — a well-formed backlog event processed fine from a cold wrapper. The
whole story was the no-prompt path: a message-shaped event carrying a
messageId but NO content was acked as "no prompt — no-op", silently, which
reads exactly like a swallowed wake. The pilot's seeding tool produced that
shape; the correlation with wrapper start was coincidental (events were
batch-seeded before wrappers started).

Two changes, both on the #887 rule (between silence and one model turn,
spend the turn):
- messageId but no content → synthesize a recovery prompt naming the message
  and instructing the agent to read the room and decide (NO_REPLY likely).
  Flows through the normal claim/cascade path, so the cost is bounded.
- truly empty (no content, no messageId, or no pod) → still acked as a
  deliberate decline, but surfaced through onError with a typed code so an
  operator can see the skip instead of burning an evening on the ambiguity.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
@lilyshen0722
lilyshen0722 merged commit b1d64dc into main Aug 12, 2026
10 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/896-no-prompt-recovery branch August 12, 2026 11:40
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.

Wrapper boot backlog: events pending at start are acked but never spawned

1 participant