- 01
Nobody steps on anybody
Each agent has its own folder and branch. You can run several on the same project without clashes.
- 02
Changes in plain sight
Files, lines added and removed, commits and the per-file diff, next to the conversation.
- 03
A review before merging
doki’s AI reads the diff and says whether it’s ready, worth a closer look, or shouldn’t be merged yet.
- 04
You pick the ending
Merge into the base branch, open or update a PR, or discard the branch and its folder.
How an isolated branch is created
When you create a new agent you pick the project folder and turn on Isolate on its own branch. If another agent is already on that project, doki turns it on for you.
doki creates the worktree from the current commit, gives it a doki/<name> branch and tells the agent where it is: don’t touch the main folder, install whatever is missing there, and don’t push or merge.
- Copy the project’s .env files gives the agent your
.envfiles, which aren’t in git. - Each branch gets its own port for its dev server, so two agents don’t fight over the same one.
- It works on your Mac and on machines over SSH.
Changes next to the chat
Under the agent’s header you get its branch card: the name, the base branch, how many files changed, lines added and removed, and commits.
View changes opens the full diff, file by file or with All files. You can also put it beside the conversation and read both at once.
If the agent works straight in your folder, with no isolated branch, doki still shows the files it left uncommitted and their diff.
dokiMacBook Proexport async function refresh(token: string) {- const s = await db.session.find(token)+ const s = await db.session.findValid(token)+ if (s.expiresAt < now()) throw expired()+ await rotate(s, { days: 60 }) return sign(s)
The AI review before merging
The review reads the changes and returns a summary, a verdict (ready to merge, check it first or don’t merge yet), the risks with their file and line, missing tests, and any secrets that slipped in.
Send findings passes them to the agent so it fixes them on the same branch. If you turn on Review when done in Settings, the review runs by itself when the agent finishes.
If the verdict is don’t merge and you press Merge, doki warns you with the main risk before going on.
dokiMacBook ProLogin sessions
Merge, open a PR or discard
Merge commits the agent’s work and merges it into the base branch in your main folder. If there are conflicts, doki leaves everything as it was and offers to ask the agent to resolve them.
Create PR pushes the branch and opens the pull request with gh. If one already exists, the button becomes Update PR. Discard deletes the folder and the branch after you confirm.
The same actions are in doki in the browser.
How to start
Create an isolated agent
In New agent pick the project, turn on Isolate on its own branch and choose whether to copy the
.envfiles.Review its changes
Read the diff next to the chat and ask for the AI review when it finishes.
Decide what gets in
Merge into the base branch, open a PR or discard the branch.
Frequently asked questions
What is a git worktree?
A second folder of the same repository with another branch checked out. It shares history with your main folder, but the files are separate.
Where does doki keep isolated branches?
In ~/.doki/worktrees/<repo>/<name>, on the machine where the agent runs. The branch is called doki/<name>.
Which agents can work on an isolated branch?
The ones you create from doki in a folder with git: Claude Code, Codex, Cursor and the rest. The exceptions are Cursor Cloud and Cursor in API mode on your Mac.
What happens if merging hits conflicts?
doki cancels the merge without touching anything and offers to ask the agent to resolve them on its branch. Your main folder also needs to be on the base branch to merge.
Do I need `gh` to open the PR?
It’s best, because doki creates the PR with it. Without gh, doki pushes the branch and opens GitHub’s compare page so you create the PR yourself.
Does the AI review send my code anywhere?
It’s done by doki’s AI that you set up in Connections, or by a Grok Bot if you pick one. What usedoki.com stores is in Security.