Roll recipe dependencies (nontrivial).

This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (dart, recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8742107998781601585

Please review the expectation changes, and LGTM+CQ.

dart:
https://dart.googlesource.com/recipes.git/+/4a80bb99e13f6877161689b1eed52d4eadb7d288
  4a80bb9 (athom@google.com)
      Manual non-trivial roll

recipe_engine:
https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bf78629064df710e4e2ffecad4a6562b08c7fcb1
  bf78629 (chanli@chromium.org)
      [recipe_modules/buildbucket] use `bb batch` instead of `bb ls`...

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=flutter-infra@grotations.appspotmail.com, fujino@google.com, zra@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib15d114cc9832231fdd00443ef4f865b5fa67a95
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/58520
Reviewed-by: Christopher Fujino <fujino@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Christopher Fujino <fujino@google.com>
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index 0f6be68..6724a75 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -21,7 +21,7 @@
   "deps": {
     "dart": {
       "branch": "refs/heads/main",
-      "revision": "e211b96d72a90883d4e50edd9c02b5eb1cfc55c1",
+      "revision": "4a80bb99e13f6877161689b1eed52d4eadb7d288",
       "url": "https://dart.googlesource.com/recipes.git"
     },
     "depot_tools": {
@@ -31,12 +31,12 @@
     },
     "fuchsia": {
       "branch": "refs/heads/main",
-      "revision": "3373a46635dffca06ef3c620b6a582c73f9c7d27",
+      "revision": "aac09983ad5988297367e81aef0c72db35f5a4e2",
       "url": "https://fuchsia.googlesource.com/infra/recipes.git"
     },
     "recipe_engine": {
       "branch": "refs/heads/main",
-      "revision": "0a8796815cf971cd30584e8e46695b609fcc09c5",
+      "revision": "bf78629064df710e4e2ffecad4a6562b08c7fcb1",
       "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
     }
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/fuchsia_recipe_unaffected.json b/recipe_modules/recipe_testing/tests/full.expected/fuchsia_recipe_unaffected.json
index 0b0ae8b..7f5693a 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/fuchsia_recipe_unaffected.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/fuchsia_recipe_unaffected.json
@@ -236,17 +236,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -263,10 +255,62 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/cobalt-x64-linux\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"cobalt\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"cobalt\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -283,17 +327,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -310,10 +346,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.arm64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -330,17 +418,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -357,10 +437,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.x64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/no_build_old_build_ignored_build.json b/recipe_modules/recipe_testing/tests/full.expected/no_build_old_build_ignored_build.json
index f632a39..efb3245 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/no_build_old_build_ignored_build.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/no_build_old_build_ignored_build.json
@@ -236,17 +236,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -263,10 +255,62 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/cobalt-x64-linux\", \"project\": \"flutter\"}, \"endTime\": \"2012-04-17T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"cobalt\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-04-17T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"cobalt\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -281,17 +325,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -308,9 +344,38 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
@@ -324,17 +389,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -351,10 +408,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.x64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-04-15T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-04-15T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/no_latest_cl.json b/recipe_modules/recipe_testing/tests/full.expected/no_latest_cl.json
index 372cb75..45af6cb 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/no_latest_cl.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/no_latest_cl.json
@@ -234,17 +234,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -261,9 +253,38 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
@@ -279,17 +300,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -306,10 +319,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.arm64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"200\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"200\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@200@https://cr-buildbucket.appspot.com/build/200@@@"
     ]
   },
@@ -922,17 +987,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -949,10 +1006,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.x64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/recipe_proto.json b/recipe_modules/recipe_testing/tests/full.expected/recipe_proto.json
index 89344d5..e767a0a 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/recipe_proto.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/recipe_proto.json
@@ -230,17 +230,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -257,9 +249,38 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
@@ -273,17 +294,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -300,9 +313,38 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
@@ -316,17 +358,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -343,9 +377,38 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
diff --git a/recipe_modules/recipe_testing/tests/full.expected/recipes.json b/recipe_modules/recipe_testing/tests/full.expected/recipes.json
index 09534f1..11f8199 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/recipes.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/recipes.json
@@ -234,17 +234,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"recipes\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -261,10 +253,62 @@
       }
     },
     "name": "get builders.fuchsia/try/recipes.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"recipes\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/recipes\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"recipes\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/recipes\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"recipes\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"recipes\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/recipes_with_buildbucket.json b/recipe_modules/recipe_testing/tests/full.expected/recipes_with_buildbucket.json
index 2c88e73..559d4e4 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/recipes_with_buildbucket.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/recipes_with_buildbucket.json
@@ -221,17 +221,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "1000",
-      "-fields",
-      "builder",
-      "-predicate",
-      "{\"createTime\": {\"startTime\": \"2012-05-13T12:53:21Z\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -247,9 +239,35 @@
       }
     },
     "name": "get builders.get green tryjobs",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,id\"}, \"predicate\": {\"createTime\": {\"startTime\": \"2012-05-13T12:53:21Z\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {}@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,id\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"createTime\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"startTime\": \"2012-05-13T12:53:21Z\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@"
     ]
   },
   {
@@ -265,17 +283,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"recipes\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -291,10 +301,62 @@
       }
     },
     "name": "get builders.fuchsia/try/recipes.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"recipes\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/recipes\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"recipes\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/recipes\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"recipes\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"recipes\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/two_pass_one_skip.json b/recipe_modules/recipe_testing/tests/full.expected/two_pass_one_skip.json
index dfe32bc..c0f714c 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/two_pass_one_skip.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/two_pass_one_skip.json
@@ -236,17 +236,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -263,10 +255,62 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/cobalt-x64-linux\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"cobalt\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"cobalt\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -283,17 +327,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -310,10 +346,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.arm64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"200\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"200\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@200@https://cr-buildbucket.appspot.com/build/200@@@"
     ]
   },
@@ -1141,17 +1229,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipe_path",
     "infra_step": true,
@@ -1168,10 +1248,62 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.x64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipe_modules/recipe_testing/tests/full.expected/with_buildbucket.json b/recipe_modules/recipe_testing/tests/full.expected/with_buildbucket.json
index 0d42fc9..74ef3ea 100644
--- a/recipe_modules/recipe_testing/tests/full.expected/with_buildbucket.json
+++ b/recipe_modules/recipe_testing/tests/full.expected/with_buildbucket.json
@@ -259,17 +259,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "1000",
-      "-fields",
-      "builder",
-      "-predicate",
-      "{\"createTime\": {\"startTime\": \"2012-05-13T12:53:21Z\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -285,10 +277,46 @@
       }
     },
     "name": "get builders.get green tryjobs",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,id\"}, \"predicate\": {\"createTime\": {\"startTime\": \"2012-05-13T12:53:21Z\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-release\", \"project\": \"fuchsia\"}, \"createTime\": \"2018-05-25T23:50:17Z\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"core.arm64-release\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"createTime\": \"2018-05-25T23:50:17Z\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,id\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"createTime\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"startTime\": \"2012-05-13T12:53:21Z\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@0@https://cr-buildbucket.appspot.com/build/8945511751514863184@@@"
     ]
   },
@@ -305,17 +333,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -331,10 +351,63 @@
       }
     },
     "name": "get builders.fuchsia/try/cobalt-x64-linux.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"cobalt-x64-linux\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/cobalt-x64-linux\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"exe_cipd_version\": \"refs/heads/main\", \"recipe\": \"cobalt\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"exe_cipd_version\": \"refs/heads/main\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"cobalt\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"cobalt-x64-linux\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -351,17 +424,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -377,10 +442,63 @@
       }
     },
     "name": "get builders.fuchsia/try/core.arm64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.arm64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.arm64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"200\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"exe_cipd_version\": \"refs/heads/main\", \"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"200\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"exe_cipd_version\": \"refs/heads/main\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.arm64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@200@https://cr-buildbucket.appspot.com/build/200@@@"
     ]
   },
@@ -397,17 +515,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "infra_step": true,
     "luci_context": {
@@ -423,10 +533,63 @@
       }
     },
     "name": "get builders.fuchsia/try/core.x64-debug.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"core.x64-debug\", \"project\": \"fuchsia\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"fuchsia/try/core.x64-debug\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"exe_cipd_version\": \"refs/heads/main\", \"recipe\": \"fuchsia\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"fuchsia/try/core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"exe_cipd_version\": \"refs/heads/main\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"core.x64-debug\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"fuchsia\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipes/recipes.expected/ci.json b/recipes/recipes.expected/ci.json
index 95b7139..c9f24ea 100644
--- a/recipes/recipes.expected/ci.json
+++ b/recipes/recipes.expected/ci.json
@@ -1763,17 +1763,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-bar\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1790,10 +1782,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-bar.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-bar\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-bar\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"flutter\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-bar\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-bar\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -1810,17 +1854,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-baz\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1837,10 +1873,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-baz.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-baz\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-baz\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"project\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-baz\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"project\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-baz\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -1857,17 +1945,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-foo\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1884,10 +1964,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-foo.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-foo\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-foo\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"flutter\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-foo\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-foo\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
diff --git a/recipes/recipes.expected/cq_try.json b/recipes/recipes.expected/cq_try.json
index 95b7139..c9f24ea 100644
--- a/recipes/recipes.expected/cq_try.json
+++ b/recipes/recipes.expected/cq_try.json
@@ -1763,17 +1763,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-bar\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1790,10 +1782,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-bar.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-bar\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-bar\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"flutter\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-bar\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-bar\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -1810,17 +1854,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-baz\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1837,10 +1873,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-baz.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-baz\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-baz\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"project\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-baz\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"project\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-baz\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },
@@ -1857,17 +1945,9 @@
   {
     "cmd": [
       "bb",
-      "ls",
+      "batch",
       "-host",
-      "cr-buildbucket.appspot.com",
-      "-json",
-      "-nopage",
-      "-n",
-      "25",
-      "-fields",
-      "builder,create_time,created_by,critical,end_time,id,infra,input,number,output,start_time,status,update_time",
-      "-predicate",
-      "{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-foo\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}"
+      "cr-buildbucket.appspot.com"
     ],
     "cwd": "[START_DIR]/recipes",
     "infra_step": true,
@@ -1884,10 +1964,62 @@
       }
     },
     "name": "get builders.flutter/try/flutter-foo.buildbucket.search",
+    "stdin": "{\"requests\": [{\"searchBuilds\": {\"mask\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"}, \"pageSize\": 25, \"predicate\": {\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter-foo\", \"project\": \"flutter\"}, \"status\": \"SUCCESS\"}}}]}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@{\"builder\": {\"bucket\": \"try\", \"builder\": \"flutter/try/flutter-foo\", \"project\": \"flutter\"}, \"endTime\": \"2012-05-13T12:53:20Z\", \"id\": \"100\", \"input\": {\"gerritChanges\": [{\"host\": \"flutter-review.googlesource.com\", \"project\": \"flutter\"}], \"properties\": {\"recipe\": \"flutter\"}}, \"status\": \"SUCCESS\"}@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@    {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"builds\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@          {@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"builder\": \"flutter/try/flutter-foo\",@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"endTime\": \"2012-05-13T12:53:20Z\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"id\": \"100\",@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"input\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"gerritChanges\": [@@@",
+      "@@@STEP_LOG_LINE@json.output@                {@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"host\": \"flutter-review.googlesource.com\",@@@",
+      "@@@STEP_LOG_LINE@json.output@                  \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@                }@@@",
+      "@@@STEP_LOG_LINE@json.output@              ],@@@",
+      "@@@STEP_LOG_LINE@json.output@              \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@                \"recipe\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@json.output@              }@@@",
+      "@@@STEP_LOG_LINE@json.output@            },@@@",
+      "@@@STEP_LOG_LINE@json.output@            \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@json.output@          }@@@",
+      "@@@STEP_LOG_LINE@json.output@        ]@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  ]@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@STEP_LOG_LINE@request@{@@@",
+      "@@@STEP_LOG_LINE@request@  \"requests\": [@@@",
+      "@@@STEP_LOG_LINE@request@    {@@@",
+      "@@@STEP_LOG_LINE@request@      \"searchBuilds\": {@@@",
+      "@@@STEP_LOG_LINE@request@        \"mask\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\"@@@",
+      "@@@STEP_LOG_LINE@request@        },@@@",
+      "@@@STEP_LOG_LINE@request@        \"pageSize\": 25,@@@",
+      "@@@STEP_LOG_LINE@request@        \"predicate\": {@@@",
+      "@@@STEP_LOG_LINE@request@          \"builder\": {@@@",
+      "@@@STEP_LOG_LINE@request@            \"bucket\": \"try\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"builder\": \"flutter-foo\",@@@",
+      "@@@STEP_LOG_LINE@request@            \"project\": \"flutter\"@@@",
+      "@@@STEP_LOG_LINE@request@          },@@@",
+      "@@@STEP_LOG_LINE@request@          \"status\": \"SUCCESS\"@@@",
+      "@@@STEP_LOG_LINE@request@        }@@@",
+      "@@@STEP_LOG_LINE@request@      }@@@",
+      "@@@STEP_LOG_LINE@request@    }@@@",
+      "@@@STEP_LOG_LINE@request@  ]@@@",
+      "@@@STEP_LOG_LINE@request@}@@@",
+      "@@@STEP_LOG_END@request@@@",
       "@@@STEP_LINK@100@https://cr-buildbucket.appspot.com/build/100@@@"
     ]
   },