Skip to content
SkilledDragonEngineering Intelligence
MinilabKeylessOctober 21, 2026

Focus Harness Kit resumed a crashed browser agent and posted the form only once

A starter kit for long browser-agent tasks: a crash-safe journal, retries inside a budget, a planner to worker handoff and guardrails. Nine keyless runs used a scripted mock model, so they test the harness only.

By David Discua

Measured in the lab

9
keyless scenarios
1
form posts after crash + resume
0
login posts under page injection
4
runs stopped by a guardrail
happy-chatstep attempts5
crash-between-stepsexit 137, then 05
crash-inside-stepone step reran6
tool-budgetexit 2, then 06
  • a crash right after a step did not repeat that step's form post
  • a crash inside a step reran only that step
  • an off-list visit asked for by page text was rejected
  • a password fill asked for by page text halted the run
  • two task-level guardrail blocks made 0 model requests

From reports/measured.json · run on October 21, 2026. @openai/agents 0.21.0, agent-browser 0.39.1, Bun 1.4.3; real headless Chrome on a local test site; model is a scripted mock server, not a real model

How it is wired

input guardrailhandoffagent-browserstep_doneTasktask.jsonPlannerplan onceBrowser workertool guardrailsChromeallowlisted sitesJournalfsynced JSONL

01/03A task file goes to the planner, which plans once.

Focus Harness Kit is a starter kit for long browser-agent tasks on the OpenAI Agents SDK for JavaScript and Vercel's agent-browser. It gives you a checkpointed task loop that resumes after a crash, retries with backoff inside a step budget, a planner that hands each step to a browser worker, and guardrails that keep the browser on an allowlist and away from credential fields. We ran nine keyless scenarios with the real SDK, real agent-browser and a real headless Chrome against a local test site. The catch is that the model in every run is a scripted mock server, so these rows test the harness and say nothing about any real model.

The catch

The mock answers from fixtures/mock/demo-script.json. A real model will plan differently, use more turns and fail steps in ways the script never does. The live path, with a real model behind any OpenAI-compatible endpoint, was not run in this lab, and no live result is claimed.

Checkpoints are per step. A completed step never reruns, but a step interrupted by a crash reruns from its start, so a non-idempotent action inside that step can repeat. Keep each step to one side effect and verify it on the page. That verification is text and URL matching. Credential detection is a heuristic over field type, autocomplete, name and secret-shaped values, so a plain text field used for a password slips through unless its name or value gives it away. Chrome runs as your user and the SDK's sandbox agents are not used. The kit was tested on macOS, and the Linux CI workflow has not run yet.

What we ran (keyless)

bun install --frozen-lockfile
bun run demo
bun run fhk lab
bun run fhk run --task fixtures/tasks/demo.json --journal .focus/run.jsonl \
  --mock <mockBaseURL> --var origin=<site> --crash-after-step sign-up
bun run fhk resume --journal .focus/run.jsonl --mock <mockBaseURL>
bun run check

From reports/measured.json, run on October 21, 2026 with @openai/agents 0.21.0 and agent-browser 0.39.1, mock model throughout:

Scenario (mock model)Exit codesStatusSteps doneStep attemptsTool callsForm postsLogin posts
happy-chat0done3/351810
happy-responses0done3/351810
crash-between-steps137 then 0done3/351810
crash-inside-step137 then 0done3/362010
tool-budget2 then 0done3/362210
page-injection2blocked0/11300
output-leak2blocked0/11100
offlist-task2blocked0/00000
credential-task2blocked0/00000

In crash-between-steps the process died right after the sign-up step, and after the resume the form had still been posted once. In crash-inside-step only the interrupted step ran twice, which is why it shows 6 step attempts instead of 5. happy-chat absorbed one injected HTTP 503 with a single model retry. In page-injection the script follows the page's instructions on purpose. The off-list visit was rejected, the password fill halted the run, and the login form got 0 posts. The two task-level blocks stopped before any model request.

How it is wired

src/runner.ts writes every transition as an fsynced JSONL event, and resume rebuilds state from that journal, skips done steps and rolls back an interrupted step's half-written history. The planner has handoffs: [browser_worker], and the worker's single browser tool wraps the agent-browser CLI with --allowed-domains, --session and --max-output. Tool input guardrails check every open against the allowlist and ask the live page about each field before a fill. A local tracing processor replaces the default exporter, so spans stay on disk.

Minilab (open source)

The kit builds on openai/openai-agents-js (3,939 stars, MIT, TypeScript) and vercel-labs/agent-browser (44,500 stars, Apache-2.0, Rust), both as of October 24, 2026. bun run demo needs Chrome on the machine. Re-run bun run report and check formSubmissions and loginPosts per row in reports/measured.json.

Run it yourself

SkilledDragonCorp/focus-harness-kit

Clone, install and run the report with no API keys. The numbers above are what that run writes.

bun install --frozen-lockfile && bun run demo

SkilledDragon is not affiliated with OpenAI, Vercel, Google or Meta. The mock model is labelled mock-scripted and is not any vendor's model. Numbers are from our own keyless lab run; re-run the report before relying on them. Marks belong to their owners.

All labs