create_branch
Fork an existing session to isolate experimental changes, then merge the branch back or close it if not needed.
Instructions
Fork a new session from an existing one. Use this to isolate an experiment, explore an alternative modeling approach, or try a risky edit without touching the parent session -- if the branch doesn't pan out, close_session it; if it does, merge_branch it back into the parent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "create_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | The parent session to branch from. | |
| version_id | No | Optional. Fork from this specific historical version of the parent instead of its current state. Recommended when you intend to merge_branch the result back later: it records the exact fork point merge_branch needs as its merge base. Without it, merge_branch has no automatic fork point and requires an explicit 'base_version_id' itself. |