Drop in for a virtual coffee, Wednesdays at 5:30pm

A worked example: what the tools hand back

The clearest place this bites is the information your tools return. Every tool answers in its own dialect. One returns a date as a number, another returns the same date as a line of text, a third reports success as a code while its neighbour reports it as the word ok. None of them ever agreed with each other, because there was never any reason they would.

Handed that raw, Claude does the converting itself, in its head, every time it reads them. It will usually get it right. Usually is the problem. The failure is a quiet one too: comparing a date written as a number against the same date written as text does not break loudly, it just returns a confident wrong answer about which came first. You are also paying for that conversion on every result, in reasoning that could have gone on the actual question.

But converting a date format is arithmetic. It has one right answer, so it belongs in code: written once, applied to every result, the same way each time. What reaches Claude is then a single consistent shape. Its reasoning goes on what the answer means rather than what form it arrived in. It is the whole decision in miniature, a decision you make when you build rather than one Claude makes while it runs. It never chooses to convert, or forgets to, because it is never asked.

A date as a number1752451200The same date as text14 July 2026Success as a code200, or the word okNormalisein codedecided once,applied every timeOne shapereaches Claude
Every tool answers in its own dialect. Converting them in code, once and the same way every time, means Claude reads one consistent shape and spends its reasoning on what the answer means rather than what form it arrived in.
Say it another way

Three suppliers, three habits. One labels everything in ounces, another in grams, the third just writes “a punnet”. You do not ask the chef to convert them in his head in the middle of service, because one distracted sum and the cake is ruined and nobody finds out until it comes out of the oven. So you put a scale by the back door and everything is rewritten in grams before it reaches the line. Same ingredient, same amount, one language. The chef reads, he never converts.

Doing this with Claude Code

When Claude works from what your tools hand back, decide what it should be reading rather than letting each tool set its own terms.

Convert the formats in code, not in the prompt. Dates, units and status codes have one right answer, so turn them into a single agreed shape before Claude reads them rather than asking it to cope with the variety on every result.

Decide the shape once, when you build. Pick the form each field should arrive in upfront, so every result is prepared the same way and Claude is never the one choosing whether to convert.

Change the shape, never the meaning. That step should only re-express what the tool said. Once it starts dropping results or deciding which ones matter, it is making the decision for you rather than preparing the input.

Part of When to use AI and when not to.