# 5 coding-agent turns vs 1 command_run workflow: full example

> Published 2026-08-03 · https://www.promptzone.com/yohjituralab/5-coding-agent-turns-vs-1-commandrun-workflow-full-example-1ic

**Disclosure:** I maintain [Tura](https://github.com/Tura-AI/tura).

Here is the simple idea. A normal coding agent may use five separate LLM turns for one predictable workflow.

**Turn 1 — inspect**

```bash
rg -n "TODO|command_run|handler" crates/
rg --files crates/runtime/src crates/tools/src
```

**Turn 2 — apply the patch**

```diff
- // old command handler logic
+ // patched command handler logic
```

**Turn 3 — build**

```bash
cargo build -p runtime
```

**Turn 4 — test**

```bash
cargo test -p runtime --lib
```

**Turn 5 — lint**

```bash
cargo clippy -p runtime --all-targets
```

The overhead is not only the shell commands. The model wakes up five times and receives the growing conversation again.

Tura exposes one macro tool called command_run, so the agent can send the same workflow once:

```json
{
  "name": "command_run",
  "arguments": {
    "commands": [
      { "step": 1, "command_type": "shell_command", "command_line": "rg -n \"TODO|command_run|handler\" crates/" },
{ "step": 1, "command_type": "shell_command", "command_line": "rg --files crates/runtime/src crates/tools/src" },
      { "step": 2, "command_type": "apply_patch", "command_line": "*** Begin Patch\n*** Update File: crates/tools/src/command_run/handler.rs\n@@\n-    // old command handler logic\n+    // patched command handler logic\n*** End Patch" },
      { "step": 3, "command_type": "shell_command", "command_line": "cargo build -p runtime" },
      { "step": 4, "command_type": "shell_command", "command_line": "cargo test -p runtime --lib" },
      { "step": 4, "command_type": "shell_command", "command_line": "cargo clippy -p runtime --all-targets" }
    ]
  }
}
```

Build, test, and lint still run. The model simply does not need a new turn between predictable steps.

In the full DeepSWE comparison, Balanced used **35.8% fewer turns** and **31.1% fewer tokens** than Codex CLI. Direct used **69.1% fewer turns** and **77.5% fewer tokens**.

GitHub: https://github.com/Tura-AI/tura

Benchmark: https://turaai.net/benchmark