Most text-to-SQL models are trained to convert a question into a single, static SQL query. But that setup ignores how database agents actually work in production, where they operate through stateful, multi-turn interaction with live databases—inspecting schemas, running probe queries, and refining their approach based on results.

A new arXiv paper, HarnessSQL, argues for what the authors call harness-native training. Instead of training on isolated question-to-query pairs, the model learns within the full environment it will eventually use, including the tools and feedback loops that come with a live database.

The abstract is brief and does not include experimental details or benchmark numbers. Its significance lies in reframing the problem: making the training process mirror the interactive reality of database agents, rather than treating text-to-SQL as a purely static mapping task.