Skip to content

Timed-out waits tell the asker who is silent and to ask the user - #21

Merged
rennf93 merged 1 commit into
masterfrom
timeout-note
Oct 21, 2026
Merged

rennf93 merged 1 commit into
masterfrom
timeout-note

Conversation

@rennf93

@rennf93 rennf93 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

A timed-out murmur_wait (or murmur_send with wait) now carries a note that tells the asker who is still silent and not to start work that could overlap theirs: ask the user, or wait again.

Why

On timeout the result was only conditionMet: false, timedOut: true plus the matrix (resolveTimedOut, src/broker.ts), and nothing told the asking agent what to do next. A session stuck in a long tool call misses the window, and then both sessions can decide to go ahead. Suggested on the Reddit post: default the asker to pinging the user on timeout, because one extra ping costs less than two sessions doing the same work.

What changed

  1. WaitResult gets an optional note (src/protocol.ts). timeoutNote() builds it from the matrix in resolveTimedOut, for example: timed out: bob, carol have the message but have not replied; dave has not confirmed receipt. Do not start work that could overlap theirs: ask the user, or murmur_wait again.
  2. delivered and acknowledged count as having the message; queued and sent as unconfirmed (sent only means a transport took it). replied is never named.
  3. No note when the condition was met, for an empty matrix, or for timeoutMs: 0: that is a status check that never waited, so it gets no advice about waiting.
  4. Tool descriptions and the MCP instructions are unchanged, so the rule costs tokens only when a wait times out. The MCP server and both adapters already pass the wait result through as JSON.
  5. docs/consult.md, docs/reference/protocol.md (the wait row also gains the replies field it was missing), CHANGELOG [Unreleased] Added.

Issue

No issue filed. From a comment on the Reddit post.

How it was verified

  • Tests first. On master's src, 4 fail: the 3 new broker note tests and the MCP wait test (AssertionError: expected undefined to be 'timed out: bob have the message but h...', and for the snapshot check expected true to be false). They pass with the change.
  • npm run coverage: Tests 512 passed (512), 100 percent on statements (2325/2325), branches (1306/1306), functions (430/430) and lines (2247/2247). tsc --noEmit exit 0, markdownlint 0 issues, typos exit 0, no em or en dashes in the diff.
  • An independent review confirmed all 7 claims. It ran the new tests against master's src in a scratch worktree (4 failed, 139 passed). It also checked that a reply landing in the same tick as the timeout can't be named as silent: resolveTimedOut reads the matrix synchronously, and a reply handled first resolves the wait through checkWaiters and clears its timer.
  • Not run: a live end-to-end check through the hummin and opencode adapters (read only: both JSON.stringify the whole result).

Behavior changes

A timed-out wait result can have a new note field. Nothing else changes.

@rennf93
rennf93 merged commit a02461e into master Oct 21, 2026
20 checks passed
@rennf93
rennf93 deleted the timeout-note branch October 21, 2026 09:05
@rennf93 rennf93 mentioned this pull request Oct 21, 2026
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