Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion suites/clawbench/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
CLAWBENCH_BROWSER = "/app/src/harbor/kernel-browser.py "
HARBOR_BROWSER = "/app/src/harbor/harbor-browser.py "
RUNTIME_BLOCK = re.compile(r"\n---\nHarbor browser runtime:\n.*?\n---\n", re.DOTALL)
# ClawBench forbids command-line tools, but agents without a file-read tool
# need a shell to read the task's files.
FILE_ACCESS = (
"\n---\nReading files with shell commands (for example under `./my-info/`) is "
"allowed. Do everything else through the browser.\n---\n"
)


def preflight() -> None:
Expand Down Expand Up @@ -82,4 +88,4 @@ def _remove_tool_wiring(task_dir: Path) -> None:
config["environment"].pop("mcp_servers", None)
write_config(task_dir, config)
for path in instructions(task_dir):
path.write_text(RUNTIME_BLOCK.sub("\n", path.read_text()))
path.write_text(RUNTIME_BLOCK.sub(FILE_ACCESS, path.read_text()))
1 change: 1 addition & 0 deletions tests/test_clawbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ def test_generate_runs_on_the_harbor_browser_without_tool_wiring(tmp_path):
instruction = (task / "steps" / "run" / "instruction.md").read_text()
assert "Harbor browser runtime" not in instruction
assert "9223" not in instruction
assert "Reading files with shell commands" in instruction
2 changes: 1 addition & 1 deletion toolsets/kernel-mcp-local/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## Browser tools

- Use the `kernel` MCP server's `execute_playwright_code` tool for all browser interaction. Wait for the server to finish initializing before starting; in Claude Code, call `WaitForMcpServers` if it is still pending.
- Before your first browser call, read your browser's session ID from the file `/run/kernel-mcp/session-id` (reading this one file with a shell command is allowed) and pass it as `session_id` on every call.
- Before your first browser call, read your browser's session ID from the file `/run/kernel-mcp/session-id` and pass it as `session_id` on every call.
- Do not create, list, update, or delete browsers, and do not use Kernel managed auth.
- Interact through page navigation and DOM/UI actions. Do not call `fetch`, `XMLHttpRequest`, Playwright request APIs, or other HTTP clients inside `execute_playwright_code`.
"""
Expand Down
Loading