Should we fix, sell, or replace this warehouse forklift? Designing fail-closed AI decision packets
"We have a three-year-old reach forklift with $9,100 in repairs this year, an open hydraulic fault, and a $19,500 cash offer from a dealer. Do we fix it, sell it, or replace it—and how do you wire an AI system to give that answer without inventing numbers or touching the ledger?"
Technical founders and engineering leads building software for warehouses, distribution centers, and hardware operators face this question every budget cycle. On the business side, capital is selective heading into 2027. In the Equipment Leasing and Finance Association's November 2026 Monthly Confidence Index (November 19, 2026), overall industry confidence held steady at 60.0 (against 60.4 in October), with 86.4 percent of executives expecting CapEx financing demand to stay flat and 23.8 percent expecting greater access to capital. Captive finance commentary in the same release pointed out that extended replacement cycles have pushed aging equipment toward an economic tipping point where rising maintenance costs and downtime increasingly favor replacement. Two days earlier, the BMO Business Outlook (November 17, 2026) noted that middle-market operators are resuming delayed equipment and automation projects while "applying greater scrutiny to returns"—and that "the AI discussion has shifted from capabilities to economics."
On the engineering side, answering a repair-sell-or-replace question looks deceptively simple in a prototype: pull the asset record, grab its repair bills, and let an LLM write a recommendation. In production, that naive pattern breaks in two silent ways: missing API reads collapse into $0 assumptions, and prose arithmetic drifts away from what the general ledger actually holds.
Consider an invented distribution-warehouse example with exact straight-line math. A cold-chain warehouse bought an electric reach forklift in December 2023 for $42,000.00 ($0.00 residual value) on a 60-month useful life. Spreading the cost evenly across 60 months produces $700.00 per month in straight-line depreciation. After 36 elapsed months (through November 30, 2026), accumulated depreciation stands at $25,200.00, leaving a net book value—what the truck is worth on paper—of $16,800.00, with 24 months ($16,800.00) of depreciation remaining.
Now put two events on the table in the same week:
- Over the trailing 12 months, verified repair bills on that reach forklift total $9,100.00 (54.17 percent of its
$16,800.00net book value), and an operator just filed an open hydraulic mast fault from the floor. - A used-equipment dealer offers $19,500.00 for the truck as-is. Under the full-month rule—where a machine sold mid-month takes no depreciation for the month of disposal—comparing
$19,500.00against the$16,800.00net book value as of November 30 yields a $2,700.00 book gain on disposal:Dr Cash $19,500.00andDr Accumulated Depreciation $25,200.00againstCr Fixed Asset $42,000.00andCr Gain on Disposal $2,700.00(both sides equal$44,700.00).
Look at what goes wrong when an unguarded language-model agent handles this workflow:
- Coercing
nullinto$0: Suppose the trailing-12-month maintenance endpoint times out or hits a per-company rate limit, returning an empty field or HTTP error. If the prompt template or JSON parser falls back to0(repair_spend = data.get("ttm_spend", 0)),$0.00 / $16,800.00 = 0%. Without the open fault, a model using that fallback outputsMONITORinstead ofREPLACE—telling an operations VP to hold a truck that is already past its 50-percent repair-to-book-value threshold. - Unbounded scope and hallucinated ROI: Asked "Should I keep or sell this forklift?", a general-purpose model will happily invent a replacement purchase price, extrapolate an ROI payback period, or estimate capital-gains taxes it has no authority or inputs to compute.
- Prose drift: Even when tools return
$16,800.00and$9,100.00, asking a model to copy multi-row depreciation schedules and journal lines into free-form chat prose risks formatting drift unless the numbers render directly from structured tool payloads.
To make repair-sell-or-replace decision support safe for finance and operations teams, engineering teams need four architectural boundaries enforced in deterministic code, never in prompt wording alone:
- Compute thresholds and closing entries in deterministic
Decimalcode. Keep the rule explicit and testable:REPLACEif trailing-12-month repair spend exceeds 50 percent of net book value or if the machine is past its end of life with an open fault;REPAIRif an open fault exists within those limits; andMONITORotherwise. Separate book arithmetic from physical inspection, ROI projections, replacement pricing, and tax estimates. - Fail closed on missing reads (
"unavailable", never0). If any upstream ledger, maintenance, or fault read fails, omit the verdict ("Recommendation withheld") and label the unreadable field"unavailable". A missing read is an operational state, not a zero-dollar fact. - Enforce read-only execution and plan gating in the agent tree. A decision specialist should never hold write tools or proposal executors, and plan-gated capabilities should be excluded from the runtime agent graph at boot rather than hidden behind a system-prompt refusal.
- Render structured surfaces with inspectable tool provenance. Deliver calculations as typed UI cards populated from tool outputs, and surface the exact tool calls and returned payloads under each reply so an accountant or engineer can trace every dollar back to the register.
How Asset Foresight handles this. In Asset Foresight, forward-looking capital decisions live in Pillar 3 (Foresight, on Enterprise) and follow these exact four boundaries across our Google ADK service and Rails ledger:
- Boot-time tier gating: On Enterprise, the coordinating supervisor routes keep-or-sell and forecasting questions to our Insights specialist alongside the rest of the specialist team. On Standard, the runtime builder omits Enterprise analysis specialists from the agent tree at startup and returns a clear upgrade notice rather than relying on a system-prompt refusal. (Forward-looking decision packets, sale and acquisition scenarios, and forecasts ship on Enterprise.)
- Fail-closed decision packet: When an owner asks "Should I keep the reach forklift, or sell it for $19,500?", the Insights specialist runs a single-read decision packet. In one pass, deterministic Python code places posted net book value (
$16,800.00), trailing-12-month repair spend ($9,100.00), open faults (1), remaining useful life (24 months), and remaining depreciation ($16,800.00) beside a book sale preview under the full-month rule ($2,700.00gain and the balanced closing journal lines) and theREPLACEverdict—explicitly marked as arithmetic on the register, with zero ROI or tax claims. If any ledger or maintenance read fails or hits a rate limit, the tool withholds the verdict ("Recommendation withheld: ... could not be read") and renders"unavailable", never0. - Read-only tools, turn budgets, and A2UI provenance: Every lookup tool on the Insights specialist is marked read-only in the tool contract, and our runtime execution plugin enforces strict per-turn ceilings on agent handoffs, specialist tool calls, backend API requests, and total model calls. Structured tables and cards attach in ephemeral turn state (stripped before session persistence), get captured before serialization, and render as typed UI components with expandable Show details steps so a reviewer can inspect every tool output behind the numbers.
- Human decision, immutable ledger: Advice never executes. If the owner sells or replaces the forklift, a person records the retirement on the asset page—never in chat. Asset Foresight posts the closing entry in integer cents, syncs it to QuickBooks Online or Xero, writes to an append-only audit log protected by database triggers that block updates, deletes, and truncation, and stops future
$700.00monthly depreciation runs (which otherwise post automatically on the 1st). The agents do the legwork. You make the call.
What to do on Monday. Pick three high-maintenance machines in your operation—reach trucks, conveyors, packaging lines, or lab analyzers—and run a 10-minute integrity test on how you decide repair vs. replace today:
- Put each machine's net book value, trailing 12-month repair spend, remaining useful life, and open faults side by side. Flag any unit whose 12-month repairs exceed 50 percent of what it is worth on paper.
- Check your reporting pipeline (spreadsheet formula or AI script) for silent zero coercion: what happens if a vendor repair bill hasn't been linked to the machine yet or an API query returns
null? Verify that your tooling prints"unavailable"and withholds a verdict instead of defaulting to$0.00.
General information, not tax advice. Your accountant knows your situation.
Sources:
