TDI
Early-stage · Unreleased

A safety net for
AI that writes code.

TDI watches an AI model while it writes code, catches the slips that matter, and corrects them before the answer reaches you. This page is the full story: what it does, what it has achieved, how good it really is, and where it falls short.

An original research project by 26io Techlab.

The problem

AI writes fluent code and still makes small, confident mistakes.

It forgets a rule you gave it earlier. It leaves out one piece of what you asked for. It calls a function that sounds real and isn't. It says it added something it didn't. Each answer reads perfectly well, which is why people only find out later, when it has already cost them time.

A bigger model doesn't remove this. TDI is our answer: it catches these slips as the code is written.

What TDI can do

It watches for five kinds of slip.

These are the slips TDI catches.

Rules you gave

“Use requests, not httpx.” “Standard library only.” “Must run on Python 3.8.”

A few messages later the AI quietly breaks the rule. TDI catches it and the answer is corrected to follow your rule.

Parts of your request left out

You ask for a function called load_config, a --verbose option, and exit code 2 on failure.

The answer looks complete but silently misses one. TDI checks the code for each named piece.

Functions that don't exist

A method on a library that sounds real and isn't.

It reads fine and fails later. TDI catches functions that don't exist before you ever run the code.

Code that doesn't run

A stray bracket, a misplaced default, a keyword used as a name.

TDI catches code that cannot even load, and the model fixes it first.

Claims the code doesn't back up

“I also added tests for the parser,” and there are none.

TDI compares what the AI says it did with what the code contains.

How the fix reaches you. When TDI spots a slip, the answer is corrected before you see it. You get the corrected version, with nothing to click through. We work hard on keeping wrong alarms rare, because a checker that cries wolf is worse than none.

The story

How we got here, including the parts that failed.

  1. Stage 1

    The idea

    AI coding assistants write fluent code and still slip: they forget a rule you gave, drop part of a request, call functions that don't exist. We asked whether those slips could be caught and corrected as the code is written.

  2. Stage 2

    Many false starts

    We built and tested dozens of small approaches. Several failed outright, and we kept the failures. The lesson: one general “is this answer okay?” checker is not reliable. Checking each kind of slip separately is.

  3. Stage 3

    The first checks pass

    Broken instructions and broken code reached our bar on data we had held back. The check for made-up functions followed, at 98.4%.

  4. Stage 4

    The first full-system test

    All checks running together on fresh, never-seen test data: 98.4% of mistakes caught across nearly 10,000 cases, with wrong alarms around 1 in 500. Longer multi-message conversations were the weak spot and stayed on the to-do list.

  5. Stage 5

    Bigger, harder tests

    More conversations, new subject areas, and a stricter standard. We found the system was sometimes “correcting” answers that were fine, so we worked on cutting wrong alarms. We froze the system before making a new test set, then ran it on 273 answers it had never seen: wrong alarms fell from 6 (2.2%) to 1 (0.4%), with no clear loss of real catches (4 cases were unclear). These are small numbers from our own test. Our larger latest test measured 1.0%. The latest full test is below, including the lines we missed.

Our own work

Designed, built and measured in-house.

TDI is original work by 26io Techlab. The idea, the checks, the test data and every number on this page were created by 26io Techlab, led by our founder, Gokulakannan R. Nothing here is licensed, resold or adapted from another company's product. We run the tests ourselves and publish what they show, including the lines we missed.

© 2026 26io Techlab. TDI is a 26io Techlab research project. Please credit 26io Techlab if you reference this work.

How good is it

Strong where we've measured it.

Headline results from our first full-system test: every check running together on test data nobody had looked at, with each disputed result checked by hand. These are our own tests.

98.4%
of mistakes caught

9,616 of 9,774 test cases in our first full-system test, on new data

0.21%
wrong alarms

2 in 950 answers, so TDI rarely “fixes” what was fine

97%
of caught mistakes fixed

222 of 228, against 36% when the model is simply asked again

0 of 48
answers made worse

no correct answer was damaged by a correction in the sample we checked

Benchmarks

Result by kind of slip.

“Real mistakes” are errors the AI made on its own. “Planted” means we took a correct answer and deliberately introduced the slip, so we know it is there.

Rules you gave
Real mistakes the AI made
97.6%
519 of 532
Rules you gave
Mistakes we planted
97.0%
3,742 of 3,858
Parts of a request left out
Real mistakes the AI made
95.9%
140 of 146
Parts of a request left out
Mistakes we planted
98.9%
1,021 of 1,032
Functions that don't exist
Mistakes we planted
98.4%
622 of 632
Code that doesn't run
Mistakes we planted
99.9%
3,572 of 3,574

Overall across these six rows: 9,616 of 9,774 caught (98.4%; we are 95% sure the true figure is between 98.1% and 98.6%). After a correction, 97.4% of the AI's own mistakes were fixed, against 35.5% when the model was simply asked to try again.

The latest test

The latest test: the whole system, on new data, including what we missed.

98 new conversations across 36 subject areas the system had never seen, across all five checks, plus a separate behaviour test (60 new tasks in 40 more new areas). We set the pass lines before running it and did not change them afterwards.

Left-out requests, real mistakes
Target: at least 90%
96.8%153 of 158
Met target
Core slips we planted (our main test set)
Target: at least 90%
97.7%130 of 133
Met target
Code that doesn't run, planted
Target: at least 90%
100%281 of 281
Met target
Claims the code doesn't back up, planted
Target: at least 90%
91.4%223 of 244
Met target
Behaviour slips we planted
Target: at least 90%
88.0%44 of 50
Missed target
Wrong alarms
Target: safely under 2%
1.0%4 of 385; could be up to 2.6%
Missed target

Counting each target in the table separately, four of six were met and two were not: behaviour slips we planted, and wrong alarms. Behaviour checks on real answers were also weak (reported, not graded). We publish all of them.

Plainly

So how good is TDI?

  • Strong: it catches almost all of the mistakes it is built for (about 96–99%, depending on the kind) and fixes nearly all of what it catches, with very few wrong alarms.
  • Weaker: the wrong-alarm rate, which sits just outside our own limit.
  • Not measured at all: other languages, other models, real users, and outside verification.
Where it can be used

Wherever AI writes code that people depend on.

TDI is proven on Python code from an AI coding assistant. These are the settings where that matters most. We say plainly which ones we have tested and which are still targets.

AI coding assistants

Products where a model writes code for users and one invented function or dropped requirement costs real time. TDI is built for exactly this.

Directly tested

Teams with strict stack rules

Fintech, health software, government and enterprise teams that set rules like “standard library only”, “no pandas” or “must run on Python 3.8” and need the AI to keep them across a long session.

Rule-keeping tested; not in these fields

Unattended coding agents

Agents that write and change code for many steps without a person watching, where an early slip compounds. A quiet watcher that corrects as it goes is the point.

Not yet tested end to end

Data and automation scripts

Analysts and operations teams generating Python scripts they may not read closely: reports, file processing, scheduled jobs.

Same kind of code; not tested with these users

Teaching and training

Coding tutors and exercise platforms where the AI must follow the exercise's rules and not hand over code that doesn't run.

Not yet tested
Limits

What you should know before relying on any of this.

  • Python code only. Other languages are not covered yet.
  • Tested on one open-source language model. We expect it to carry over to others, but we have not shown it.
  • The test conversations were generated by us and every disputed result was checked by hand by us. No outside party has verified them yet.
  • No real users yet. Everything is measured on test data, never on live traffic.
  • It is slower and costs more to run than the bare model. We have not solved speed.
  • Wrong alarms are low (1.0%) but our latest test could not rule out up to 2.6%, above our 2% limit.

What's next: tighten the wrong-alarm rate, test on other models and languages, make it cheaper to run, and get the results checked by someone outside 26io. TDI is not a product and isn't available to use yet. We'll publish more as results earn it, and say so plainly when they don't.

Building with AI that writes code?

If a slip costs you time or money, we'd like to hear how. Write to us directly.