Repository navigation
Conversation
The extension's void-returning `sendMessage` can be downgraded when the ACP client defers agent-initiated turns, leaving a doorbell request silently renamed to `.delivered` with no turn ever running. - `installTaskInboxDoorbell` now tracks `sessionIdle`, waits for an observable `turnStarted`/`turnEnded` signal, and only marks a request `.delivered` after a turn actually starts. - If an idle turn is deferred, it falls back to `sendUserMessage` to force a user-owned turn; if that also fails, it renames the request `.failed` and appends a durable status note. - Exposed `turnStarted`/`turnEnded` on the returned doorbell object so the primary adapter can drive them from its own OMP event handlers, avoiding conflicting `omp.on` subscriptions. - Applied the same idle-deferred boundary to `sendWakeNotification` in the primary watcher, with a bounded fallback to `sendUserMessage`. - Added `test_omp_idle_deferred_no_turn_forces_user_turn` to assert the deferred no-turn path and its escalation. Tests and checks run: - bash tests/fm-omp-task-inbox-doorbell.test.sh - bash tests/fm-omp-branch-supervision.test.sh - bash tests/fm-omp-primary.test.sh - bash tests/fm-omp-fleet-hooks.test.sh - tests/fm-omp-branch-types.test.sh - bin/fm-lint.sh - bin/fm-ensure-agents-md.sh Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…` so a synchronous durable move of the matching inbox record into `handled/` is treated as the authoritative delivery receipt, even when the OMP client does not emit `turn_start`. This resolves the failing bound remote OMP delivery while preserving deferred-turn fallback behavior. Verified with `bash tests/fm-omp-task-inbox-doorbell.test.sh` and `git diff --check`
Owner
Author
|
Superseded: the OMP idle-turn defect is being addressed by porting upstream's fixes (kunchenguid/firstmate kunchenguid#3497/kunchenguid#3946/kunchenguid#3943/kunchenguid#3823/kunchenguid#3767 et al.) and adapting them to the OMP branch, in one coherent task, rather than reinventing. This branch's analysis + reproduction are referenceable by that task. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix the OMP task-inbox doorbell silently stranding steering messages delivered to an idle secondmate
What Changed
turn_start, with a boundedsendUserMessagefallback and durable failure status when no turn starts.Risk Assessment
✅ Low: The reviewed changes preserve durable request markers, recover ambiguous claims on retirement, and coalesce idle wake fallback delivery without a source-verifiable correctness defect.
Testing
Exercised the focused doorbell suite, including the idle/deferred-turn end-to-end path, forced user-turn fallback, durable failure escalation, native routing, and bounded unacknowledged behavior; also ran the focused OMP primary suite. All targeted checks passed and the worktree remained clean.
Evidence: Targeted OMP doorbell behavior output
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
.omp/extensions/lib/fm-task-inbox-doorbell.ts:205-retire()clearspendingAckswithout resolving the corresponding.pending.ambiguousfiles (lines 199-208). Concrete sequence: an idle request is sent, moved to.ambiguous, and waits forturnStarted;session_shutdownthen callsretire()before any turn starts, leaving the ambiguous file behind. A lateractivate()only reconciles.processing.<pid>files (line 264), so this request is never redelivered, marked failed, or otherwise surfaced. This can still silently strand the exact idle-session message this change claims to fix. The remedy requires choosing/authorizing the durable terminal-state policy for unresolved claims (for example, recover or explicitly fail them on retirement)..omp/extensions/fm-primary-omp.ts:275- The primary watcher fallback uses one mutable timer but does not coalesce or cancel an existing timer before scheduling another (wakeFallbackTimer = setTimeout(...)at lines 265-286). If two idle wake notifications arrive within the ACK window, each schedules a timer; if the first forcedsendUserMessagehas not emittedturn_startby the time the second fires, both raw wake contents are submitted as user turns. This can duplicate watcher prompts and produce multiple turns for one idle period. The fix needs an explicit product choice for coalescing/ordering multiple pending wake contents, so the remedy is not safely inferable from the current intent.🔧 Fix: Recovered retired claims and coalesced watcher fallback wakes
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-omp-task-inbox-doorbell.test.shbash tests/fm-omp-primary.test.shRepeatedbash tests/fm-omp-task-inbox-doorbell.test.shthree times to check timing-sensitive fallback behaviorgit status --shortto confirm tests left no worktree artifacts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.