Skip to content

Instantly share code, notes, and snippets.

@rgarcia
Created August 19, 2026 20:34
Show Gist options
  • Select an option

  • Save rgarcia/f77789dad8895f235aeaf2ecba77ede5 to your computer and use it in GitHub Desktop.

Select an option

Save rgarcia/f77789dad8895f235aeaf2ecba77ede5 to your computer and use it in GitHub Desktop.
ClawBench Kernel browser runtime PR draft

PR title

feat(browser-runtime): add native Kernel support

PR description

What does this PR do?

Adds Kernel as a managed browser runtime:

uv run clawbench-run test-cases/v2/<case> <model> \
  --browser-runtime kernel \
  --browser-runtime-options '{"stealth":true,"region":"us-east"}'

The integration creates a Kernel browser, connects the existing ClawBench runtime and harness over CDP, captures the standard action/request/screenshot/message artifacts, downloads the Kernel replay as data/recording.mp4, and deletes the browser after the run.

No new package dependency is required; the provider uses Kernel's REST API through the standard library.

Lifecycle

The new KernelRuntimeProvider handles:

  1. Browser creation using KERNEL_API_KEY and optional KERNEL_BASE_URL.
  2. Runtime options for stealth, region, proxy, and tags.
  3. Replay creation before the harness connects.
  4. Replay stop, processing polling, documented HTTP 202 retry handling, and MP4 download.
  5. Browser deletion on success, failure, interruption, or replay errors.

Replay finalization uses a shared five-minute deadline. Missing or invalid recordings produce browser_runtime_artifact_failed rather than silently marking the run successful.

Managed-runtime behavior

This also generalizes behavior that was previously specific to Browserbase:

  • managed runtimes default to batch concurrency 1;
  • batch runs hide credential-bearing viewer URLs;
  • recording behavior is selected through provider capabilities;
  • claude-code-chrome-extension is rejected for managed runtimes because it requires its own browser process inside the container.

Local, remote-CDP, Steel, and Browserbase behavior remains unchanged.

User-facing changes

  • Adds kernel to CLI and TUI runtime selection.
  • Documents configuration and runtime options.
  • Adds provider-neutral managed-runtime messaging.
  • Updates the English and Chinese documentation and changelog.

Corpus

  • v2
  • v1
  • both
  • not applicable

Test plan

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pyright
  • uv run pytest -q — 203 passed
  • Real Kernel + browser-use run completed with interception and all five artifact layers.
  • Kernel replay downloaded as a playable MP4 and the browser was deleted.
  • 20-task V2 Hermes batch at concurrency 4 completed with zero infrastructure failures; all 20 replays downloaded and all 20 browsers were deleted.
  • Failure-path and HTTP 202 replay-processing behavior covered by unit tests.

Related issues

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment