desktop AGENTS.md

Project instructions for running a browser and desktop app with separate local profiles for different Git branches. A profile stores app data such as sessions, while a Git branch is an isolated line of code changes.

In plain words
What is it for?
Use it to start the app with a branch-specific profile, copy session databases between profiles, remove an unused profile, and check database schema compatibility.
Why use it?
It prevents branches from sharing the wrong local database or browser session and helps detect when a copied database does not match the current code.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/browser-use/desktop/agents-md
Clone the repo
git clone --depth 1 https://github.com/browser-use/desktop

Made for: Codex, OpenCode.

Per session 453 This file is loaded in full into every session.
When invoked 453 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00453 $0.00453
Opus 5 $0.00227 $0.00227
Sonnet 5 $0.00091 $0.00091
Haiku 4.5 $0.00045 $0.00045

Measured yesterday against content hash d02684c15502, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

desktop AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 34 lines

What it actually says

Browser Use Desktop Agent Notes

Local Dev Profiles

  • The app's runtime database lives under Electron userData, not under the git worktree. Do not assume the default profile when working across branches.
  • Use task worktree:profile:path to get this branch's isolated profile path. It resolves to .task/user-data/<current-branch> by default.
  • Use task worktree:up to start the app against that isolated profile.
  • Use task worktree:profile:clean FORCE=1 to delete this branch's isolated profile after quitting the app.
  • Use task db:worktree:copy FROM=default to copy sessions.db from the platform default profile into this branch profile. Pass FROM=branch:<name> to copy from another branch profile, including branch names with /. Use an absolute path, ./relative/path, ~/path, or FROM=path:<path> for explicit filesystem paths. Pass FORCE=1 if the target DB already exists.
  • Use task db:worktree:doctor after copying or when local task runs fail. It compares the target sessions.db schema version and schema ID against the current checkout's src/main/sessions/schema-manifest.json.
  • If the app was launched with AGB_USER_DATA_DIR, run task agent:run with the same AGB_USER_DATA_DIR. The local task runner reads <userData>/local-task-server.json; pointing the CLI at a different profile will miss the running app even if sessions.db is valid.
  • Quit the app before copying or cleaning profile files. SQLite WAL files and Electron runtime files can be open while the app is running.

Session Schema Changes

  • DB_SCHEMA_VERSION gates migrations at runtime.
  • src/main/sessions/schema-manifest.json tracks the expected fresh schema ID for CI/main drift detection.
  • Run task db:schema:check after touching SessionDb migrations.
  • Run task db:schema:update only after an intentional schema change.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 34 lines · 453 tokens per session scan A d02684c15502

Subscribe to this mod's changes

desktop AGENTS.md is an instructions file published in the GitHub repository browser-use/desktop (668 stars, last pushed 28d ago), licensed MIT. It adds 453 tokens to every session, about $0.0023 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.