Let agents write code to call tools instead of exposing every tool directly

Future_AGI · reddit · 2026-10-01

A Reddit discussion argues that as agent tool lists grow, tool schemas bloat context and the model mis-calls tools; typical fixes only buy marginal room. The durable approach: give the model a sandbox where it writes short scripts calling tools as functions, looping and chaining in code instead of one call per step—cutting per-run token use and wrong calls. The real trade-off: you're executing model-written code, so sandbox imports and network access must be locked down.

Original post →

More from coding & agent

coding & agent channel →