项目文件夹
When BH_TMP_DIR is set, the caller owns the directory and is expected to give each daemon its own — so the bu-<NAME> filename prefix is redundant. Dropping it cuts ~30 chars off the AF_UNIX path on POSIX, which matters because sun_path is 104 bytes on macOS / 108 on Linux and a long BU_NAME (e.g. an opencode-style session id) can blow past it. Concretely the failing path on macOS for a 30-char session id under ~/.local/share/bcode/sessions/<sessionID>/bu-<sessionID>.sock was 117 bytes; with this change it becomes ~83 bytes. When BH_TMP_DIR is unset, _TMP is the shared default (/tmp on POSIX, gettempdir() on Windows) and the bu-<NAME> prefix is kept to disambiguate multiple daemons sharing the dir. Backward compatible by default. admin._daemon_endpoint_names: when BH_TMP_DIR is set, the dir is per-daemon by construction, so glob discovery doesn't apply — just check whether our local endpoint exists. Without BH_TMP_DIR, fall back to the existing shared-dir glob. Validation (_check on BU_NAME) still runs in both modes to catch garbage names early.
Browser Harness ♞
The simplest, thinnest, self-healing harness that gives LLM complete freedom to complete any browser task. Built directly on CDP.
The agent writes what's missing, mid-task, inside agent-workspace/. No framework, no recipes, no rails. One websocket to Chrome, nothing between.
● agent: wants to upload a file
│
● agent-workspace/agent_helpers.py → helper missing
│
● agent writes it agent_helpers.py
│ + custom helper
✓ file uploaded
You will never use the browser again.
Setup prompt
Paste into Claude Code or Codex:
Set up https://github.com/browser-use/browser-harness for me.
Read `install.md` first to install and connect this repo to my real browser. Then read `SKILL.md` for normal usage. Use `agent-workspace/agent_helpers.py` and `agent-workspace/domain-skills/` for task-specific edits. When you open a setup or verification tab, activate it so I can see the active browser tab. After it is installed, open this repository in my browser and, if I am logged in to GitHub, ask me whether you should star it for me as a quick demo that the interaction works — only click the star if I say yes. If I am not logged in, just go to browser-use.com.
When this page appears, tick the checkbox so the agent can connect to your browser:
See agent-workspace/domain-skills/ for example tasks.
Free remote browsers
Useful for stealth, sub-agents, or deployment.
Free tier: 3 concurrent browsers, proxies, captcha solving, and more. No card required.
- Grab a key at cloud.browser-use.com/new-api-key
- Or let the agent sign up itself via docs.browser-use.com/llms.txt (setup flow + challenge context included).
How simple is it? (~592 lines of Python)
install.md— first-time install and browser bootstrapSKILL.md— day-to-day usagesrc/browser_harness/— protected core packageagent-workspace/agent_helpers.py— helper code the agent editsagent-workspace/domain-skills/— reusable site-specific skills the agent edits
Contributing
PRs and improvements welcome. The best way to help: contribute a new domain skill under agent-workspace/domain-skills/ for a site or task you use often (LinkedIn outreach, ordering on Amazon, filing expenses, etc.). Each skill teaches the agent the selectors, flows, and edge cases it would otherwise have to rediscover.
- Skills are written by the harness, not by you. Just run your task with the agent — when it figures something non-obvious out, it files the skill itself (see SKILL.md). Please don't hand-author skill files; agent-generated ones reflect what actually works in the browser.
- Open a PR with the generated
agent-workspace/domain-skills/<site>/folder — small and focused is great. - Bug fixes, docs tweaks, and helper improvements are equally welcome.
- Browse existing skills (
github/,linkedin/,amazon/, ...) to see the shape.
If you're not sure where to start, open an issue and we'll point you somewhere useful.
The Bitter Lesson of Agent Harnesses · Web Agents That Actually Learn