Observation: Claude 3.5 Sonnet prefers Bash for file writing to reduce latency

lucasmeijer · x · 2026-07-22

Developer @lucasmeijer shared an interesting observation about AI coding agents: Claude 3.5 Sonnet (sol-medium) frequently uses bash commands to write files instead of directly invoking the built-in write tool.

The likely reason is that by using bash, the model can combine writing the file with the next command, avoiding the roundtrip delay caused by multiple tool calls. Although the model could theoretically achieve this by emitting parallel tool calls with parallel=false, it seems to naturally prefer this style to optimize execution efficiency.

Related event: LLs Generate Unconventional Bash Commands to Reduce Interactions(3 posts)→

Original post →

More from coding & agent

coding & agent channel →