Pre-execution contract checks for code-mode tool calls
Teams giving coding agents access to APIs, deploy tools, ticket systems, or billing-sensitive services should add a verifier between generated code and the first live call. The verifier should read the task instruction and tool registry, check tool choice, output shape, call signatures, call ordering, and argument provenance, then return item-level repair feedback.
RubricRefine reports 0.86 success on M3ToolEval across seven models, compared with 0.62 for single-pass CodeAct, with no environment execution during refinement. A practical internal test is 50 archived multi-tool tasks with known correct traces: measure wrong tool routing, malformed arguments, and provenance errors before and after the gate. The gate is most useful where a failed call changes external state, consumes quota, or creates an audit event.