Empty shell commands when mixed shell tool with function tools

I’m using the Agents SDK with the shell tool together with other tools (e.g. apply_patch and function tools) in the same tools array. In that setup the model sends a shell_call with empty commands, and the SDK throws ModelBehaviorError.

When I remove the other tools and keep only the shell tool, the model runs the shell tool correctly (with real commands) and no error is thrown.

So the issue appears when shell is mixed with other tools: we get a shell call with empty commands and ModelBehaviorError. With shell alone it works.

2 Likes