fix(server): oh my pi turns stuck silently forever now auto-fail - #18
Merged
Conversation
The provider-silence watchdog for the omp ACP adapter only ever posted a passive 'no output' banner after 75s of silence — it never actually gave up. A thread nobody was watching stayed on "Working" indefinitely whenever omp went quiet (its known internal retry-forever-on-5xx failure mode), recoverable only by a user noticing and clicking Stop. Adds a much larger give-up threshold (10 minutes of total silence with nothing legitimately outstanding — no streaming, no tool call, no pending approval/input) that reuses the same cancel + settle machinery the manual Stop button already uses, so the turn now fails automatically with a clear error instead of hanging forever. Also adds a regression test for the child process dying mid-prompt (a related but previously untested path, confirmed already working correctly and not the source of this bug). Scoped entirely to the omp adapter; Cursor/Grok/Claude/Codex have no equivalent watchdog and are untouched. Model: Claude Sonnet 4.5, harness: Oh My Pi
…e-watchdog-give-up # Conflicts: # apps/server/src/provider/Layers/OmpAdapter.ts
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.
Problem
Threads driven by the omp ACP provider would occasionally stop receiving anything from the model and get stuck showing Working forever, with no recovery — indistinguishable from the agent process dying in the background.
The adapter already had a provider-silence watchdog (75s of no tokens/tool-calls/pending-approvals → flag the session quiet), but it only ever posted a passive banner ("No output from the provider for Xs… you can stop the turn"). It never actually gave up on the turn. If nobody noticed and manually hit Stop, the thread just sat there indefinitely — matching omp's known internal failure mode of retrying an upstream 5xx forever without reporting it.
Confirmed via the live
~/.t3/userdataDB/logs that this mechanism (providerQuietSince / resolveOmpQuietTransition) exists only in the omp adapter — Cursor/Grok/Claude/Codex have no equivalent watchdog.Fix
apps/server/src/provider/Layers/OmpAdapter.ts:
Also added a regression test for the provider process dying mid-prompt (T3_ACP_EXIT_DURING_PROMPT mock-agent knob) — a related, previously-untested path. It was already handled correctly and was not the source of this bug, but is now covered.
Scoped entirely to the omp adapter; no shared code with Cursor/Grok/Claude/Codex touched.
Testing
Model: Claude Sonnet 4.5, harness: Oh My Pi