BettikDocsSign in

Reference · the tools · who is working on what

claim_environment

Safe to repeat

Claim an environment

What it does

Announce that you are working on an environment, so another session does not edit it underneath you. One writer XOR many readers, like Rust: a write claim excludes everyone else, read claims coexist and only exclude a writer. A claim does NOT expire. It is held until released, so a session that goes quiet keeps its environment rather than having it taken while nobody is looking. If someone else holds it, prefer clone_environment — a clone is yours alone, carries the database and dependencies, and takes seconds — over stealing. Steal only if the user tells you to: the other holder may simply be away from their desk. (formerly claim_bundle)

What it needs to know

environment_id
The environment to claim.
holder
What to call yourself, e.g. your session name. Other sessions see this when they collide with you, so make it recognisable.
session_id · optional
Your Claude session id, if you have one — it looks like "cse_…". Find it by running `bettik-session-id` in the terminal. It lets the box say whether your session is running right now, which is shown to whoever collides with you. Note that a session with no process is asleep rather than ended — it revives with the same id — so this is never grounds for taking someone's environment. Omit it if you have none.
mode · optional
write (default) to edit it; read to look without blocking other readers. One of write, read.
note · optional
What you are doing, shown to whoever collides with you.
steal · optional
Take it even though someone else holds it, dropping their claim.
box · optional
Which box: its name and account, "home.frank" or "jordan.northwind", or just "home" when only one of your boxes is called that. Omit it for your current box (switch_box changes it; list_boxes says which it is).
session_box · optional
The box this session runs on, if it runs on one of yours: its name, as the on-box instructions give it ("frankh90.hemlane"). With it, a call that names no box is checked against your current box.

Where it lands

On one of your boxes: the one named in box, or your default box when none is named.