Framing Newlines: how tool-call parsers rewrite the files agents write
Every open-weights agent model that emits tool calls in the Qwen/LFM3 XML framing writes each parameter value between one newline on either side. We rendered 1,762 real files as write_file calls and parsed them back with five parser implementations found in shipped code. Parsed by frame the format is invertible: 1,759 of 1,762 files return byte-identical, and the three failures contain the unescaped terminator. Parsed with .strip(), 15 survive. On a benchmark that grades file contents, a perfect model therefore scores 0.9% under the dominant client-side parser and 99.8% under the rule the reference server implementation uses — a 99-point swing with no model in the loop.