Worlds
Worlds
Fork, switch, list, change and drop worlds: instant, isolated copies of the database.
SoonThese pages describe Chronos Cloud, which opens from the waitlist. Running Chronos yourself? Self-host docs
create world agent_7 with (task = 42);switch world agent_7;update orders set status = 'paid' where id = 7;diff; -- what agent_7 changedmerge world agent_7; -- into main; the session moves back to mainEvery statement here also has an MCP tool (fork, branches, set_meta, discard) and works from the dashboard’s SQL editor. BRANCH is accepted wherever WORLD is: CREATE BRANCH, USE BRANCH, MERGE BRANCH.
Names and moments
- Names: a bare name (
agent_7), a double-quoted one ("agent-7"), or a string ('agent-7'). A name with a dash must be quoted: unquotedtask-1fails with42601. - Not allowed: empty, containing
@(42602), starting with_tx_, or one of MERGE’s own words (using,ours,theirs,confirm,by,resolve,dry,into,only) (42939). - IDs work too: anywhere a world is named, its ID does (
wand 16 hex digits, fromSHOW WORLDS). - A world as it was:
'name@when', read only. InDIFF … TO,FORK WORLD,CREATE WORLD … FROM,SIMULATE … FROM, and as the Postgres database name.
| when | Example | Means |
|---|---|---|
| a time | 2026-09-20 10:00, 2026-09-20 10:00:00+02 | UTC unless it gives an offset |
| now | now | this moment |
| a time ago | -15 minutes, -1 day, -2 hours | a new moment each time it runs |
History reaches back as far as the plan keeps it (an hour on the free plan). Earlier than that, or later than now, is 22023.
CREATE WORLD
CREATE WORLD name [FROM source] [WITH (key = value, ...) | META '<json object>']- Source: the session’s world, unless
FROMnames one: a name, an ID, or'name@when'(the new world holds that past). - Metadata:
WITHvalues are strings, numbers,true,falseornull;METAtakes a JSON object. At most 64 KB; keys starting with_sonosare the database’s own. - Which run made it:
run_id,prompt_version,modelandtool_schemasay which run of an agent made the changes, and with what.SHOW AUDITand Reviews show them, andUNDO AGENT … WHERE run_idputs back one run. - Scope:
may_change,tenant,max_rows,max_deletesdeclare what the world is meant to change, held to at its merge. See Stale reads and scope. - The session stays on its world: switch with
SWITCH WORLD.
create world agent_7 from main with (owner = 'claude', task = 42);create world run_r42 with (run_id = 'r42', prompt_version = 'triage-v9', model = 'claude-opus-5-5');create world check_it from 'main@-1 hour';| Error | When |
|---|---|
42710 | a world with that name exists |
3D000 | no such source |
53400 | past the database’s limit of open worlds (100 on the free plan) |
22P02 | META isn’t JSON |
FORK WORLD
FORK WORLD source [AS] name [WITH (key = value, ...) | META '<json object>']The same as CREATE WORLD name FROM source, with the source first.
fork world agent_7 as agent_7b meta '{"tags": ["retry"]}';fork world 'main@2026-09-20 10:00' as before_the_deploy;SWITCH WORLD
SWITCH WORLD name -- also SWITCH BRANCH, USE WORLD, USE BRANCH, USE nameThe session’s statements run on that world from now on. Over Postgres the database name does the same for the whole connection; see Your app.
SHOW WORLDS
One row per open world, main included. SHOW BRANCHES is shorter: name, parent, and changes (rows changed since its fork).
| Column | Type | Meaning |
|---|---|---|
name | text | |
id | text | stable ID; main’s is main |
parent | text | null for main |
depth | integer | forks between it and main |
created | timestamptz | null for main |
version | bigint | the world’s write version |
meta | jsonb | its metadata |
owner | text | the agent that forked it, or null |
expires | timestamptz | when it’s discarded (TTL), or null |
active | timestamptz | last used |
pinned | boolean | never discarded for being idle |
scope | jsonb | what it was forked to change, if declared |
ALTER WORLD
| Form | Effect |
|---|---|
ALTER WORLD w SET (k = v, …) | sets keys in its metadata; null removes one |
ALTER WORLD w SET TTL '2 hours' | discarded that long from now, unless it has forks then |
ALTER WORLD w RESET TTL | never expires |
ALTER WORLD w SET PINNED | never discarded for being idle |
ALTER WORLD w RESET PINNED | idle rules apply again |
alter world agent_7 set (task = null, reviewer = 'ada');alter world agent_7 set ttl '1 day';DROP WORLD
DROP WORLD [IF EXISTS] name [CASCADE] -- also DELETE WORLD, DROP BRANCH- Without
CASCADE, refused while it has open forks (2BP01); with it, it and every world forked from it go, deepest first. - A session on the dropped world carries on from its parent.
maincan’t be dropped (0A000).
Who may do what
| Statement | An agent needs |
|---|---|
CREATE / FORK WORLD | fork |
SWITCH, SHOW WORLDS, SHOW BRANCHES, DIFF | read |
ALTER WORLD | the world to be its own; TTL and pins need admin |
DROP WORLD | the world (and with CASCADE, every fork) to be its own |
MERGE WORLD | merge_own for its own worlds, merge for any; write_main to reach main |
None of these run inside BEGIN … COMMIT (25001). A refused statement fails with 42501, naming the right it needs.