Blog: Keeping Tenancy Decisions Moving When AI Takes a Pause
Keeping Tenancy Decisions Moving When AI Takes a Pause
Release v0.1.329 — AI Assessment Failure Retry with Degraded Fallback
No AI service is immune to the occasional hiccup. A timeout here, a transient error there — these are facts of life in any system that relies on external intelligence. What matters is what happens next.
With v0.1.329, we've made sure the answer is: something useful.
The Problem We Solved
Our AI deduction assessment pipeline already benefits from Inngest's built-in retry infrastructure. But sometimes, all retries can be exhausted and an assessment still fails. Previously, when that happened, the aiDeductionAssessments row would sit in a failed state — and the user requesting the assessment might not have had a clear signal about what to do next.
For a landlord or agent in the middle of closing out a tenancy, that ambiguity isn't acceptable.
What We Built
An event-driven safety net
We've introduced a new escalation workflow that listens for the ai/assessment.failed event. The moment an assessment exhausts all retries, this workflow takes over.
First, it checks how old the failure is. If the assessment failed within the last 24 hours, it's worth trying again — AI services can recover quickly from transient issues. So we re-queue one more attempt automatically, with no action needed from the user.
If that retry succeeds, everything continues as normal. The user gets their assessment results without ever knowing there was a problem.
If the retry also fails, we move into degraded fallback mode:
- The user receives a clear, plain-language in-app notification letting them know AI assessment is temporarily unavailable.
- The notification includes a direct link to our manual deduction guidance, so they can keep moving without the AI.
- The assessment record is updated with a human-readable error message, giving both users and support staff full visibility into what happened.
Why This Matters
Our mission is to make the end of every tenancy fair, fast, and stress-free. A failed AI job shouldn't become a bottleneck that delays deposit returns or leaves a landlord unsure of their next step.
By combining an automatic retry with a graceful fallback to manual guidance, we ensure:
- No silent failures — users are always informed.
- No dead ends — there's always a next step.
- Full auditability — every failure and recovery action is recorded.
For Developers
The workflow is entirely event-driven (ai/assessment.failed) and touches four entities: aiDeductionAssessments, notifications, usageEvents, and users. The 24-hour staleness check prevents redundant retries for abandoned or stale jobs, keeping the system clean.
See the AI Assessment Failure Retry & Degraded Fallback feature doc for the full technical breakdown.