Repository navigation
fix: recovered Scient Agent turns end completed; Continue, crash and analytics fixes - #965
Merged
Merged
Conversation
…at failed A turn whose prompt's own run failed (a DNS outage that spent the retry budget) could be woken by a background result, recover and finish normally, and still be marked failed: prompt_result reports only the prompt's first run, and Desktop treated it as authoritative. A later run of the same turn now decides the outcome from its own ending. Analytics: - retryAttempts counts retry rows on every node of the run; native retry rows sit on their own nodes, so the screenshot run's 17 retries became 0. - A run that fails before its session starts is reported (provider.turn.failed started=false) instead of dropped. - Turn outcomes and provider.request.completed carry runRef, a one-way hash of the local run id, so a run's outcome joins its request totals. - Turn outcomes carry providerVersion (the agent build). - app.diagnostics adds oldestEventAgeBucket, so an outage shows as late delivery rather than missing events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt how they end Both main-window renderer crashes on 2026-11-16 (and one in a dev app) were Chromium's CHECK_GT in SoftNavigationHeuristics: an input event that starts an in-app route change carried a timestamp earlier than the page's load start, which macOS passes through unchecked for posted events. Scient reads no soft-navigation timing, so --disable-features now adds SoftNavigationDetection on every platform, merged after the Linux list (Chromium keeps only the last value). app.health for a renderer termination now carries exitReason and exitCode, so a CHECK (SIGTRAP, exit 5) is told apart from memory pressure or a kill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Continue after a usage limit or Stop failed before starting on Scient Agent with "This provider cannot resume without a new message": the OMP RPC has no message-less continue, so the native-session adapter offered no resumeTurn. A native session can now declare a continuation prompt, and Scient Agent's adapter sends one, so the offered Continue works. Session-open failures showed only "Failed to open <driver> provider session <id>". The adapter's redacted reason beneath that wrapper now becomes the category reason, e.g. "The provider session could not be opened: RPC command get_available_models timed out after 30000 ms. ..." A turn that needs Scient Agent's model catalog asks again once after a command timeout instead of failing the turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrors Scient Agent now reports a `network` kind when no response reached the provider (DNS, refused, offline). The turn outcome ranks it before `transient` and analytics keeps it as a failure code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review (Codex): superseding the prompt's evidence dropped its structured cause, so a turn whose prompt run and follow-up run both hit the same 429 became a generic failure without a reset time. The prompt's evidence now only gives way when the follow-up run ended normally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-check (Codex): keeping prompt evidence let a successful prompt_result mark a turn completed although its later run failed. After a later run, only that run's ending decides, except that a failed later run after a failed prompt keeps the prompt's structured cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
What Changed
Fixes from an audit of real Scient Agent failures (Nov 10–16) and what analytics recorded about them.
stop, but Desktop still marked the turn failed with the old DNS error. The cause:prompt_resultreports only the prompt's first run, and Desktop treated it as final. Now, once a later run of the same turn starts, that run's ending decides. One exception: when the later run also fails after a failed prompt, the turn keeps the prompt's structured cause (a usage limit and its reset time). Changed inOmpSessionRuntime.ts.NativeSessionAdapterV2now offersresumeTurnwhen a native session declares acontinuationPrompt; Scient Agent sends "Continue where you left off."provider-corefailure.ts, in its SCIENT-FORK seam).CHECK_GT) when an input event that changed the in-app route had a timestamp earlier than the page's load start. Soft-navigation detection is now disabled on every platform. The flag is added after Linux's own--disable-featureslist, because Chromium keeps only the last value.networkfailure kind. Scient Agent's newnetworkkind ranks abovetransient, so DNS and refused connections are told apart from provider outages.Analytics:
retryAttemptscounts retries on every node of a run. The screenshot run had 17 retries and reported 0, because native retry rows are not on the root node.provider.turn.failedwithstarted: false. Seven local failures had no event at all.runRef, a one-way hash of the local run id, appears on turn outcomes and onprovider.request.completed, so a run's outcome joins its request totals.providerVersion(the agent build) appears on turn outcomes.app.diagnosticsaddsoldestEventAgeBucket, so an outage shows as delayed delivery rather than missing events.app.healthrenderer terminations addexitReasonandexitCode.Why
The owner hit many Scient Agent failures. Several were Scient's own defects rather than provider outages, and analytics misreported them: 0 retries, missing startup failures, and no way to link a run's outcome to its request totals.
Documentation Impact
Documentation impact: Updated —
docs/internals/product-analytics.mdChecks
provider/omp,orchestration-v2/Adapters,telemetry,resourceTelemetry,ProviderTurnStartService,NativeQueueHoldPolicy): 2,588 passed. One failure,OmpEventBudget.native.test.ts"sheds only the largest native backlog…", fails the same way on cleanorigin/mainon this Mac.app/windowtests, rootpnpm run typecheck, the seam check, and the commit hooks (fmt, lint, knip).Platforms
Checklist
🤖 Generated with Claude Code