mitsuhiko: OpenAI's additional_tools is additive to system prompt tools, not prior message tools

mitsuhiko · x · 2026-09-03

Armin Ronacher (mitsuhiko) shares a subtle OpenAI API gotcha: additionaltools in a request is not additive with additionaltools in prior messages — it's additive to the tools defined in the system prompt.

For anyone writing agent loops that pass tools dynamically, getting this semantics wrong can silently drop or duplicate tools; a one-liner that can save hours of debugging.

Original post →

More from coding & agent

coding & agent channel →