# Branching and tokens in Murmur

> How Murmur decides what your agent sees on each turn of a branching conversation, what that means for tokens and your plan's usage, and what does and doesn't save them. The developer version, with references to the code, is branching-tokens-explainer.md in Murmur's repository.

## The short answer

Does a branch use fewer tokens, because the agent reads only that branch? Partly.

- **A branch carries its own path and nothing else.** Every turn on a branch sends the conversation from its start (or the nearest cut) down to the reply it branched from, plus the branch's own messages. It never carries a sibling branch: what was tried on another branch isn't sent.
- **Against one linear chat with the side quest asked inline, that's fewer tokens.** In a linear chat a side question and its answer ride along with every later turn. In Murmur they stay on their branch, and the main line never carries them.
- **Against the same conversation without the side quest, there's no saving.** Branching doesn't shrink the shared history above the fork. A branch from deep in a long conversation carries all of that depth.
- **The first turn on a new branch can cost more.** A fork reloads its history into a new session. Prompt caching should usually soften this, since the fork shares its start with the parent, but it hasn't been measured yet.
- **What actually reduces what's sent is the map's tools:** Sever, Continue with these, and Summarise and compact.

## How it works

### Every line of a conversation is a real agent session

Murmur keeps a conversation as a tree of messages, on your Mac, and runs every line of the tree as a real Claude Code or Codex session over the Agent Client Protocol. A session holds its own history and sends it to the model on every turn. Murmur doesn't assemble prompts from the tree; it chooses which session a message goes to, and that choice decides what the model sees.

### Carry on, or fork

When you send a message after a reply:

1. **If that reply is the newest in its session,** the message carries on in that session, which already holds exactly this path.
2. **Anywhere else,** Murmur forks the session at that reply. The new session holds the history up to and including it, and nothing after.
3. **The first message** of a conversation starts a new session.

Editing a message and retrying a reply are the same step: an edit continues from the reply before it with your new text, and a retry asks the same question again from the same place. Both fork, so both make a branch beside the original.

Forking at a specific reply uses a fork-at-message hook in the agents' ACP adapters (plain forking would copy the whole session). It's tested: a test session is told three codewords over three turns and forked after the first and second; each fork must know only the codewords before its fork point. A second test checks that what the agent read with a tool before the fork comes with it.

### What one turn sends

1. **The session's fixed overhead:** the agent's system prompt and tools, and in Do, your Claude Code setup. A Think conversation starts at about 4.4k tokens before you type (Murmur's own short prompt and five reading and web tools); a full Claude Code setup with settings, CLAUDE.md, skills and MCP servers is about 28.5k.
2. **The path:** every message from the conversation's start, or the nearest cut, down to the reply you're continuing from, including its tool calls, tool results and thinking.
3. **Your new message**, with any notes you dragged into it, and pictures.

Never sent: sibling branches, other conversations, and sticky notes you haven't dragged into a message.

### An example

Illustrative numbers, not measurements: questions of about 50 tokens, answers of about 600.

Three turns on the main line, then a two-turn side quest off the second reply, then three more turns on the main line.

- **As one linear chat,** the side quest sits in the middle, and every later turn carries its 1.3k tokens. The eighth turn carries about 4.6k of history.
- **In Murmur,** the side quest is a branch. Every later main-line turn is 1.3k lighter, for the rest of the conversation. The side quest itself carries the first two turns plus its own.
- **Unchanged:** the first two turns are on both lines and are sent with both.

### The first turn on a new branch

A fork is a new session resumed with its parent's history up to the fork point, and its next turn sends that history to the model. Whether that costs more than carrying on depends on prompt caching: the fork's history matches the parent's, so if the parent's is still cached, the fork can read from the cache, which counts for much less than fresh input. If the cache has expired, the first turn pays for the whole path; later turns cache as normal. This hasn't been measured in Murmur yet.

Switching to a branch without sending anything costs nothing. Murmur keeps a few sessions open and closes the rest; reopening one takes under a second and sends nothing until you write.

## What actually reduces tokens

All of these give a turn a session that holds less than its full path.

### Sever

Slice across the line into one of your messages on the map, and that message becomes the start of its branch's context: nothing above the cut is sent any more. If the session below already starts there, it carries on. Otherwise, since an agent session can't forget part of what it holds, Murmur starts a fresh session with just the messages from the cut down, written out as a short transcript ahead of your message. Rejoining the cut does the same with the whole path.

### Continue with these, and Summarise and compact

From the map's Select tool:

- **Continue with these** starts from exactly the messages you picked, in order.
- **Summarise and compact** starts from a summary that stands in for the messages it covers. Writing the summary is a turn of its own, in a separate session; it pays off when the conversation carries on long enough below it.

### What these transcripts leave out

A transcript written for a fresh session keeps what was said, with any notes, and leaves out thinking, tool calls, tool results and pictures. Tool results, such as files read and pages fetched, are often the heaviest part of a session's history, so that's a saving. It's also a loss: below a cut, the agent knows what was said, not what it read, and reads a file again if it needs it.

Taking a Think branch into Do works the same way: the Do conversation starts from the branch's transcript.

## Seeing it

- **Per reply:** the ring in the message box shows how much of the context window the branch on screen uses, as the agent reports it.
- **Per plan:** Settings → Status shows your subscription's limits.

## In short

- A side quest stays on its own branch, so the rest of the conversation never carries it.
- What you try on one branch never weighs on another.
- To send less, cut, pick or summarise: Sever, Continue with these, or Summarise and compact.
- Branching is not, by itself, cheaper than the same conversation without the side quest, and the first turn of a new branch may cost more.
