Projects and where threads run
A project is a git repository on your computer. Threads belong to a project and work in its code. If you keep work and personal projects on one computer, profiles keep them apart.
Adding a project
Section titled “Adding a project”Add one from the first run, from Settings → Projects, or from the project menu in New thread. A folder browser lists the git checkouts under your home folder. New folder makes an empty repository and adds it as a project.
A project remembers a few defaults for its new threads: whether they’re Worktree or Local, the base branch, and the permission mode. Each project has its own page in Settings → Projects.
Worktree or Local
Section titled “Worktree or Local”Every thread works in one of two kinds of folder.
Worktree is the default. The thread gets a git worktree of its own, on a new branch with a short random name such as endurable/k7m3xq, in a folder under ~/.endurable/worktrees. Your checkout is untouched. Any number of worktree threads can work on one repository at once without seeing each other’s edits.
Local works directly in your checkout. There’s nothing to set up and your editor sees every change as it’s made, but there’s no isolation:
- Local threads in the same checkout see each other’s edits, and yours.
- Changes shows every uncommitted change in the checkout, not only this thread’s.
- Rewinding can’t restore code.
gitGraph commit id: "main" commit id: "your work" branch endurable/k7m3xq commit id: "thread A" commit id: "thread A, again" checkout main branch endurable/p4w9ha commit id: "thread B" checkout main merge endurable/k7m3xq id: "Ship it"
Choose per thread in New thread, and set a project’s default in Settings → Projects. A repository with no commits yet can only have Local threads, since a worktree has nothing to start from.
A Local thread can become a worktree thread later with Move to a worktree in the ⋯ menu. The worktree starts with a copy of the checkout’s uncommitted changes. The checkout keeps them too, since they may be yours. While the agent is working, the menu offers the move after this turn, or now, which stops the agent first. There’s no move back: a worktree’s work returns to the checkout by merging its branch.
Where a worktree starts
Section titled “Where a worktree starts”New thread’s Start from chip picks the commit a worktree begins at.
- The base branch is the default. endurable fetches it first and uses
origin’s copy. If your local branch is ahead oforigin, with commits you haven’t pushed, it uses yours. If the two have diverged, it usesorigin’s and says so. - Your checkout, as it is right now, uncommitted changes included. Use this to hand an agent work you’ve already started. The row is there only when the checkout has uncommitted changes or isn’t on a branch. Otherwise it’s the same commit as its branch’s row.
- Any other branch, local or on
origin. The menu has a search box for repositories with many.
The thread’s header says where it started, for example “from origin/main”.
The thread’s branch doesn’t track the branch it started from. A thread started from origin/main can never push to main by accident.
Working on an existing branch
Section titled “Working on an existing branch”Check Work on the branch itself at the top of the Start from menu to have the thread commit directly to a branch that already exists, instead of a new endurable/… one. Use this to continue a colleague’s branch or your own.
Such a branch is never deleted with the thread. Deleting or shipping the thread removes only the worktree. It keeps its name, too: Rename branch… is refused. A branch that exists only on origin gets a local branch that tracks it, so the thread’s pushes go back to where the branch came from.
A branch can be checked out in one place at a time. If it’s checked out in your own checkout or another worktree, or another thread already works on it, the thread won’t start and says where the branch is.
What happens when a worktree is made
Section titled “What happens when a worktree is made”- The worktree is created on its branch.
- Ignored files named in the checkout’s
.worktreeincludeare copied in. This is how a thread gets your.env. - The project’s
.agents/setup.shruns, if it has one.
The thread shows each step as it happens, and your first message waits until setup is done. If a step fails, the thread needs attention, with the log and Retry setup.
Threads without a project
Section titled “Threads without a project”Pick No project in New thread to just talk to a model, or to work on files you attach. The agent gets an empty scratch folder of its own, which isn’t a git repository. There’s no Changes, Files, Preview or pull request.
If the conversation turns into real work, Move to a project… in the ⋯ menu gives it a folder in a project. The conversation continues unchanged.
A thread started in the wrong project
Section titled “A thread started in the wrong project”It’s easy to start a thread with the wrong project picked. When you have more than one, the agent checks your first message against the project before it changes anything. If the message reads as work for a different project, it asks whether you meant to start it here.
Working on part of a repository
Section titled “Working on part of a repository”In a monorepo a thread usually cares about one package. Turn on Subfolders on the project’s page and New thread gains a Folder chip. Pick packages/server, say, and:
- the agent’s commands and terminals start in that folder,
- the agent is told to keep to it, though it can still read and change the rest,
- an
AGENTS.mdin that folder is read as well as the one at the top, - the list can be filtered to that folder.
Git, Changes, reviews and pull requests still cover the whole repository. Change a thread’s folder later with Change folder… in ⋯.
Moving and renaming
Section titled “Moving and renaming”The ⋯ menu shows the ones that apply to the thread:
| Item | On |
|---|---|
| Rename thread… | Any thread |
| Rename branch… | A worktree thread whose branch hasn’t been pushed. A pushed branch keeps its name, so its pull request doesn’t lose it. |
| Change folder… | A thread in a project with Subfolders on |
| Move to a worktree | A Local thread |
| Move to a project… | A thread without a project |
| Move under a thread… | Any thread. Move to top level undoes it. |
| Move to a machine | With several computers, for machines that have the same repository |
Cleaning up
Section titled “Cleaning up”Worktrees take disk space, so endurable removes the ones you’ve finished with.
- Ship it removes the worktree and branch right away, as part of merging.
- Delete removes them with the thread.
- Archived threads’ worktrees are removed seven days after archiving, or one day after if the thread’s pull request has merged. Change the period or turn this off in Settings → Idle & snooze. A thread you haven’t archived keeps its worktree.
Automatic cleanup never discards work. A worktree with uncommitted or untracked files is kept. A branch with commits that exist nowhere else is kept. Ignored files, such as node_modules and .env, do go with the worktree. Afterward the thread still opens and reads as before, as a Local thread in your checkout.
The project’s page in Settings lists every worktree and local branch in the repository, endurable’s and your own, with Remove on a worktree and Delete on a branch. Anything that would lose work says what would be lost and asks again. A row that can’t go says why: it’s your checkout, the base branch, or in use by a thread. Remove all clears every worktree that’s free to go.
If a folder goes missing
Section titled “If a folder goes missing”A worktree’s folder was deleted. The thread says so and offers Recreate from branch, as long as the branch still exists locally or on origin. Messages you send in the meantime wait for it. If the branch is gone as well, the conversation is still readable, but the work can’t come back.
A project’s folder moved. This happens after you rename a folder, or restore endurable’s data on another computer. The project and its threads show a card with Locate…, to point at where the checkout is now, and, if the project has a remote, Clone here…, to clone it again. Locate asks before accepting a checkout whose remotes don’t match the project’s.