Retry transient model failures without ending the session - #379
Merged
Haz3-jolt merged 3 commits intoSep 5, 2026
Merged
Conversation
Signed-off-by: Shaan Narendran <shaannaren06@gmail.com>
Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
Haz3-jolt
force-pushed
the
fix/transient-model-retries-37
branch
from
September 5, 2026 17:58
4cf439f to
7e50096
Compare
Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
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.
Purpose
Transient provider and stream failures currently end a model turn immediately. This change adds bounded retry handling while preserving one daemon-owned operation and keeping the session usable after exhaustion.
Fixes
Fixes #37
Related to #38
Approach
packages/ai, but let the kernel session own retry policy, backoff, cancellation, operation ownership, and canonical retry events, following Pi’s session-level architecture.Retry-Afterguidance capped at 60 seconds.model.retry_scheduledcanonically and render sanitized retry status in the TUI.No production dependency is added. Provider-specific classification remains in
packages/ai; the kernel owns retry behavior over the existingModelPortcontract.This addresses the session-usability part of #38. An explicit command to replay a failed turn is not included, so this PR no longer claims to close #38.
How was this tested?
Passed:
pnpm --filter @axl/ai test— 81 passedpnpm --filter @axl/kernel test— 82 passedpnpm --filter @axl/sdk test— 27 passedpnpm --filter @axl/daemon test— 56 passedpnpm --filter @axl/tui test— 191 passedpnpm check— final run passed: 558 passed, 8 environment-dependent integration tests skippedpnpm audit --audit-level high— no known vulnerabilitiesOne earlier
pnpm checkrun hit the pre-existing intermittent descendant-process cancellation assertion. The focused test passed immediately afterward, and the completepnpm checkrerun passed.reuse lintcould not be run because thereuseexecutable is not installed in this environment. No new files or dependencies are introduced. A live provider smoke test was not run because no external provider call was authorized for this review.Learning
Pi 0.85.0 keeps retry ownership at the agent-session layer, outside provider adapters. Axl follows that ownership model independently while retaining typed provider classification, canonical retry evidence, and the issue’s fail-closed redispatch rules.
Checklist
REUSE.toml.Signed-off-bytrailer.AI assistance
gpt-5.6-solfor the original change; the follow-up model was not exposed by the harness).