Artificial Intelligence

Claude Code looked right and missed $800K

AlixPartners tested Claude Code on 40,000 contracts. It looked clean, missed $800K and got an auto-renew date wrong.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

4 min read

Natalia Connolly and Kevin Madura put Claude Code on a post-merger procurement mess and then checked every answer, they told AI Engineer.

Claude Code looked right and missed $800K - AI Engineer
Claude Code looked right and missed $800K, AI Engineer

Their test replica was Harbor Health after its acquisition of Summit Health Plan, with hundreds of shared vendors and more than 40,000 contract documents in unlinked databases, Connolly said. The procurement lead wanted to know if the combined company could get better terms from Acme Health Services, how large the savings were and by when Harbor had to act. Claude Code returned clean and plausible tables, but the audit found total annual spend, company split and contract counts correct while total contract value was wrong by about $800,000, Connolly said.

The date was wrong too. Claude Code said December 1 to stop the soonest expiring contract from auto-renewing, while the true deadline was November 1, Connolly said. Waiting would have renewed the contract unwanted. The cause was data, not reasoning. An orphan amendment was floating unlinked to its parent so Claude Code never found the $800,000, and in another pattern two amendments each restated the full value so naive extraction summed three dollar figures to about $17 million when the text said the correct total was $7 million, the most recent restatement.

A master service agreement is the base contract that later statements of work and amendments modify, and that hierarchy was often broken. The pair spent about two weeks building a five-stage pipeline with document intelligence and OCR, classification of agreement type, term and rate extraction that handled tables split across pages, and mapping of services to spend categories, Connolly said. The 40,000 plus contracts then processed overnight. DSPy is a framework for programming language models into repeatable structured outputs, and Madura said they fed contract pages as images through DSPy to preserve charts and rate tiers that naive OCR stripped to bare axes.

With structured tables in place, they had Claude Code build its own shortcuts such as get rate card page and get specific vendor spend, with business logic encoded in code rather than prompts. An MCP server is a standard connector that exposes only approved tools to an agent and blocks everything else, and Madura said packaged tools and views let later agents inherit deal rules and keep access governed. A contract lifecycle management system is the official database where legal is supposed to store vendor names, dates and parent links, but Madura said those systems are almost never maintained so they rebuilt the hierarchy bottom-up by having Claude Code read the text.

Three failure modes remained. The agent pulled a termination clause date when the question required a renewal clause calculation, so external business rules had to be embedded up front. Governed access also hurt when Entity A and Entity B had different permissions, and Claude Code saw a zero or malformed invoice without useful feedback and kept going, Madura said. The team dispatched parallel agents for different savings levers and then reconciled them in a prescriptive workflow to avoid double counting the same vendor savings, but recommendations still failed when management had already started the action three months earlier.

The fix they urge is to spend tokens up front to structure data so Claude Code does not burn tokens rediscovering it, then keep feeding live business context. That matches where procurement AI is proven today, with spend analysis, contract intelligence, supplier risk monitoring and workflow automation as the four working areas per Spendflo. Watch the amendment link and the renewal language first, because a polished answer can cite a real page and still sum the wrong value.

Mentioned in this story

Sources

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

TopicsAlixPartnersClaude CodeHarbor HealthSummit Health PlanAcme Health ServicesDSPyMCP

StartupHub.ai Staff

Written by

StartupHub.ai Staff

Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer

Written by

Daniel Singer

Editor, reviewed this article

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

Watch

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.