Rna Agent
Concepts

Isolation and rollback

Subagents, background work and conversations you choose change files in their own worktrees and merge back automatically; every turn keeps a checkpoint you can roll back.

Letting an agent change things freely only works if a bad change can be undone. Rna covers both ends: changes first land in their own worktree and merge into the project folder after, and every turn keeps a checkpoint so whatever it wrote into the project can be rolled back as a whole.

Who works in its own worktree

WhoWhere it changes filesWhen it merges back
Subagent (worker)One worktree per subagentAfter it finishes, merged by the host when conditions allow; otherwise it stays pending and the main conversation merges it with agent_merge
Background workOne worktree per runWhen the run ends
A conversation you chooseIts own worktreeEach time it hands results back to you
Other conversationsDirectly in the project folderImmediately; checkpoints cover rollback

A conversation’s own worktree is chosen when it is created (“Run in its own worktree” next to the composer). Terminals, the files panel and previews follow that conversation’s worktree.

Merge rules

  • Your uncommitted edits in the project folder are always one side of the merge and never overwritten.
  • Your Git index, HEAD and branches are never touched, and conflict markers never land in the project folder.
  • Each file is checked for changes made during the merge before it is written; every apply is recorded before writing, so a crash can resume.
  • Files ignored by .gitignore (such as dist/) are not merged back; if dependency manifests changed, you are told to reinstall in the project folder.

Both sides changing the same place, a change against a delete, or a binary file changed on both sides count as conflicts. A subagent’s conflicts are settled by the main conversation with agent_merge: look at both sides, take one, or resolve by hand. Anything that is yours to decide shows as a card above the composer.

Every turn can be rolled back

Each turn starts with a checkpoint. At the end of a turn that wrote into the project folder you see “Applied to the project folder · N files”, with Roll back this turn next to it.

  • Rollback restores only what this turn wrote; files changed again since are marked and never overwritten along the way.
  • A rollback can itself be undone, writing the changes back.
  • The Workspace changes panel lists every apply record (conversation applies, subagent merges, background applies, conflict settlements), each one revertible.

Rollbacks are told to the model. When you roll back a turn, drop a subagent’s changes or revert background changes, the next turn starts with a note of what you undid. The model stops trusting outdated tool results, and the background no longer reads your undo as a missing apply and proposes to put it back.

Turn deliveries show the net change

“Delivered this turn” and Review show the net change per file for the turn, computed by the host, instead of adding up every edit snippet. Files someone else changed in between are shown in sections, and rolled-back files are kept and marked.

Requirements

Worktree isolation needs the project folder to be a Git repository, plus:

  • git 2.38 or later on this machine;
  • the macOS sandbox;
  • no custom filter or merge driver in the repository.

Otherwise conversations work directly in the project folder, and checkpoints and turn rollback still work.

Making the project a Git repository

If the project folder is not a Git repository yet, you can choose Initialize as a Git repository: Rna runs git init, writes or appends to .gitignore, and commits once, without adding a remote. It lists what it will do first and acts only after you confirm.

On this page