An MCP server run as `node <argv>`, as an agent's client talks to it. A request the server doesn't answer, in two minutes or before it exits (or one asked once it has), fails with what the server printed to stderr: a test doesn't hang on it. `env` adds to its environment.
A session's server as an agent's client starts it (`tcm mcp`, from `cwd`, with `env` and `argv`), its handshake made: what its instructions say, and its branch.
A session whose branch is deleted while its server runs (as a tcm from before branches were claimed could) has it made again from main, and the call made again, rather than every call failing; the session goes on.
A background job outlives the server that started it: when tcm is replaced (a new known-good verified) and the supervisor starts the server again, the new one lists the session's jobs, follows one to its end (all it printed, and its exit code), stops one, and reads what a tcm_merge started before the restart did. An id the session never gave is said so.
An agent works on a branch of its own, as work on a git branch is, unless it's told to work on the codebase's own (`--direct`). And when tcm is replaced (a new version, a new known-good build), the server starts again: the client is told its tools changed, and keeps working.
A session's tcm_search and tcm_find read its branch as it is now: a page it changed, and a definition whose doc and comments it changed (the same hash, another text version), are found as they read there, before and after each save, by the server that keeps running (its worker); main finds them as they read on main, and a save on main changes nothing the session finds. A codebase switched to the branch finds what the session does.
A session says where its scratch files are, a directory named after its branch with `/` made `_`: in its instructions, and in tcm_status. tcm_edit writes there, and a scratch file named by itself is there.
A session's server started again for the same agent (from the same directory: the client reconnecting after a pause, its server stopped or killed) goes on with its branch, and says so, as long as the branch holds work main doesn't have. Another agent's (another directory: a worktree reaching the codebase through a link) doesn't take it, nor does a second server from the same directory while the first is on it: two servers never share a branch. A session moves onto a branch it owns with tcm_cli ["switch", <branch>], once no other server is on it, and the branch it leaves goes if it holds nothing; not onto main.
What sessions leave is cleared away: a session's server starting takes the branches servers made for themselves that no running server works on, if main has all they hold (as their servers would have on stopping, had they not been killed), and session directories whose branch is gone, unless they hold unsaved work, which `tcm status` lists. `tcm branch <b> --delete` takes the branch's directory too (unless it holds unsaved work), and won't delete a running session's branch. The status says what the session's own branch has that main doesn't.
A session reads another session's branch with the reading tools' `branch` option, as that branch has it, staying on its own: its files untouched, main too. The tools that change things have no such option, and the CLI's `--branch` refuses them.
Sessions' servers starting together each get a branch of their own, and keep it: one starting doesn't clear away another's new branch as left behind (it's claimed, and cleared away, in a write transaction). A named branch another agent's server is on isn't shared: the second server says so and stops.
Agents in sessions (`tcm mcp --branch`) work in one codebase at once, each on its own branch with its own scratch files, out of the mirror's files and each other's way, until the user has tcm_merge land their work on main (and only then): main merged in, the tests it reaches passing, then onto main, which the files follow. A branch an earlier session left is seen by a new one, and can be landed from it.
A session's server the supervisor starts again goes on with the session's branch, the one it moved onto too: when tcm is replaced, and when the server crashes (what it hadn't answered is answered, to ask again).
The server runs quick tools' commands in a worker it keeps up: each answers as the command would at a terminal, an error doesn't leak into the next, what one changes the next sees, and calls made while it's busy are answered too (by a tcm of their own), as is a command it doesn't run (`tcm run`).
A tool call with an option the tool doesn't have (one a newer tcm has, or a misspelt one) is refused, naming it, the build, and the options the tool has, rather than run without it: a `cwd` this server's tcm_cli didn't know would have run the command on the codebase itself. Options of objects inside the call are checked too. The tools that read the codebase take `live`, as the ones that change it do.